home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 424_02 / ed.hlp < prev    next >
Text File  |  1994-03-21  |  117KB  |  2,722 lines

  1. 0 HELP
  2.  
  3. This is an online help library for the  ED  editor,  a  multi-window  text  and
  4. binary file editor. For information about how this library works, enter "HELP".
  5. To get rid of this message, hit RETURN.
  6.  
  7. ED works on a variety of terminals, and you can teach it how to deal  with  new
  8. terminals  with  relatively  little trouble. See the help topic 'terminals' for
  9. more information about this.
  10.  
  11. 1 ABORT
  12.  
  13. The same as QUIT, except that it terminates file list processing and  multiple-
  14. file  mode. For example, if you specified -ffilename when you started ED, ABORT
  15. would terminate the list processing prematurely. Similarly, if you used a wild-
  16. card  in a file name, ABORT would stop the wildcard processing and give you the
  17. File> prompt immediately. You can also get  out  of  multiple-file  mode  using
  18. ABORT.
  19.  
  20. 1 ascii
  21.     0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
  22.  
  23.  0  NUL SOH STX ETX EOT ENQ ACK BEL BS  HT  LF  VT  FF  CR  SO  SI
  24.  1  DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM  SUB ESC FS  GS  RS  US
  25.  2  SP  !   "   #   $   %   &   '   (   )   *   +   ,   -   .   /
  26.  3  0   1   2   3   4   5   6   7   8   9   :   ;   <   =   >   ?
  27.  4  @   A   B   C   D   E   F   G   H   I   J   K   L   M   N   O
  28.  5  P   Q   R   S   T   U   V   W   X   Y   Z   [   \   ]   ^   _
  29.  6  `   a   b   c   d   e   f   g   h   i   j   k   l   m   n   o
  30.  7  p   q   r   s   t   u   v   w   x   y   z   {   |   }   ~   DEL
  31.  
  32. 1 BOOKMARK
  33.  
  34. The BOOKMARK command creates a 'bookmark' file, which saves  your  place  in  a
  35. file. The next time you edit that file, ED will position you at the same record
  36. you were on when you last got out of the file.
  37.  
  38. What actually happens when you say BOOKMARK is this:
  39.  
  40. o  Suppose you're editing a file called  test.dat,  and  you're  on  the  fifth
  41.    record  in  the  file, on the eight byte. You issue the BOOKMARK command. ED
  42.    creates a file (in the same directory as the file itself)  called  test.dat-
  43.    EDbookmark,  and writes the 5,7 into it. (The 7 is the offset from the first
  44.    byte to the eight byte.)
  45.  
  46. o  When you leave the file (whether by EXIT, QUIT, ABORT or by closing  a  win-
  47.    dow), ED updates the bookmark file with your current position in the file.
  48.  
  49. o  The next time you  edit  test.dat,  ED  will  try  to  find  a  file  called
  50.    test.dat-EDbookmark.  If  it  finds  such  a  file,  and  if  it  contains a
  51.    "number,number" string on the first line, ED assumes it's  a  bookmark  file
  52.    and positions the cursor to the specified record and offset.
  53.  
  54. To make ED stop doing this, delete the bookmark file.
  55.  
  56. In general, it isn't a good idea to edit bookmarked files with  other  editors,
  57. since  this may make meaningless the position that is specified in the bookmark
  58. file.
  59.  
  60. You can abbreviate the BOOKMARK command as BO.
  61.  
  62. 1 box_mode
  63.  
  64. The SET BOX ON command puts ED in "box cut/paste" mode. In box  mode,  you  can
  65. cut rectangular areas out of your file, and paste them in elsewhere, preserving
  66. their rectangular shape. The idea is to make it easy to cut a table and move it
  67. somewhere else. Suppose you are looking at some text that looks like this:
  68.  
  69.  Now is the time
  70.  For all good men
  71.  To come to the aid
  72.  Of their country.
  73.  
  74. If you moved to the i in 'is', hit SELECT, moved to the u in 'country', and hit
  75. CUT, in normal cut mode the result would be:
  76.  
  77.  Now untry.
  78.  
  79. and the paste buffer would contain:
  80.  
  81.  is the time
  82.  For all good men
  83.  To come to the aid
  84.  Of their co
  85.  
  86. In normal cut mode, ED removes all characters from the beginning of the  select
  87. range  to  its end, including the "line breaks" that separate lines of the file
  88. from each other. In box mode, what gets  cut  is  always  a  rectangular  area,
  89. bounded  on  opposite corners by the cursor and the select marker. In the above
  90. case, the box cut result would be:
  91.  
  92.  Now ime
  93.  For  men
  94.  To che aid
  95.  Of tntry.
  96.  
  97. and the paste buffer would contain:
  98.  
  99.  is the t
  100.  all good
  101.  ome to t
  102.  heir cou
  103.  
  104. Thus in box mode, the number of lines in the file remains constant; only a sec-
  105. tion  of  each line in a group gets cut. When you paste in box mode, ED inserts
  106. the rectangular area you previously cut, starting at the  cursor  position,  by
  107. making  a  space  in the middle of each line, and inserting data from the paste
  108. buffer. This keeps the entire rectangle of data together.
  109.  
  110. Box mode does not affect other kinds of deletion from  the  file:  DELC,  DELW,
  111. DELL,  deletion/replacement of search strings, and SUBST work in the normal way
  112. regardless of the box mode state. Only CUT and  APPEND  perform  the  box  mode
  113. operation, and only if you enable it.
  114.  
  115. Note: when you use box cut and paste, ED converts all  TAB  characters  in  the
  116. affected  lines  to  spaces. Also, box mode doesn't work in any useful way when
  117. you are in binary or hex mode (using the -b and -h options when you invoke ED).
  118. Another  peculiarity: when you are in a diredit buffer, and box mode is on, and
  119. you SORT a select range, ED trims trailing spaces from the file names  involved
  120. in  the  sort. If one of the files actually had trailing spaces in its name, ED
  121. would not know this, and would trim them off.  From  that  point  forward,  you
  122. would  be  unable  to  visit  that  file,  because the trailing spaces would be
  123. absent.
  124.  
  125. 1 BIGGER
  126.  
  127. The BIGGER command makes the window the cursor is  in  bigger.  The  syntax  is
  128. BIGGER lines, where lines is how many additional screen lines you want the win-
  129. dow to occupy. Other windows are made smaller to accommodate the new size.
  130.  
  131. You can abbreviate the BIGGER command as BI.
  132.  
  133. 1 BYTE
  134.  
  135. The BYTE command inserts a single byte into the current buffer. You specify the
  136. value  of  the character in the BYTE command itself: BYTE 32, for example would
  137. insert a space character (whose ASCII value is 32). BYTE is very similar to the
  138. SPECINS keypad command, except that you can use the results of a calculation to
  139. determine which value the inserted character has.
  140.  
  141. You can abbreviate the BYTE command as BY.
  142.  
  143. 1 CALCULATE
  144.  
  145. The CALCULATE command takes the entire line the cursor is on and  feeds  it  to
  146. the  calculator,  which  tries  to evaluate it as an arithmetic expression. The
  147. calculator puts the result of the calculation (or, possibly, an error  message)
  148. in the PASTE buffer.
  149.  
  150. You can abbreviate the CALCULATE command as CA.
  151.  
  152. 2 expressions
  153.  
  154. The calculator takes algebraic expressions as you would  see  them  in  a  math
  155. textbook.   For  example, 2+2. It recognizes '+' for addition, '-' for subtrac-
  156. tion, '*' for multiplication, '/' for division, and '^' for exponentiation. The
  157. order  of  evaluation  is left to right for everything. You may use parentheses
  158. freely.
  159.  
  160. 2 intrinsic_functions
  161.  
  162. The calculator recognizes the following functions:
  163.  
  164.  abs   absolute value                exp      exponential
  165.  sin   sine of angle(radians)        ln       naperian logarithm
  166.  sind  sine of angle(degrees)        log      decimal logarithm
  167.  cos   cosine of angle(radians)      sqrt     square root
  168.  cosd  cosine of angle(degrees)      fact     factorial
  169.  tan   tangent of angle(radians)     arcsin   arc sine(radians)
  170.  tand  tangent of angle(degrees)     arcsind  arc sine(degrees)
  171.  cot   cotangent of angle(radians)   arccos   arc cosine(radians)
  172.  cotd  cotangent of angle(degrees)   arccosd  arc cosine(degrees)
  173.  csc   cosecant of angle(radians)    arctan   arc tangent(radians)
  174.  cscd  cosecant of angle(degrees)    arctand  arc tangent(degrees)
  175.  sec   secant of angle(radians)      sinh     hyperbolic sine
  176.  secd  secant of angle(degrees)      cosh     hyperbolic sine
  177.  int   integer part of a number      tanh     hyperbolic tangent
  178.  
  179. For example, to get the decimal logarithm of seven factorial, you  would  enter
  180. log(fact(7))  on  a line by itself, issue the CALCULATE command, and then PASTE
  181. the result into the file.
  182.  
  183. 2 limitations
  184.  
  185. Some of the math functions place limitations on what numbers you can feed them.
  186. These limits are:
  187.  
  188. o  tan, tand, sec, secd -- angle must not be 90 or 270 degrees.
  189. o  cot, cotd, csc, cscd -- angle must not be 0 or 180 degrees.
  190. o  exp, sinh, cosh -- absolute value of the number must be less than 88.7.
  191. o  arcsin, arcsind, arccos, arccosd -- number must be between -1 and 1.
  192. o  sqrt -- number must be nonnegative.
  193. o  ln, log -- number must be positive.
  194. o  fact -- number must be between zero and 33.99999.
  195.  
  196. 1 CD
  197.  
  198. The CD command changes your current working directory. The command syntax is CD
  199. directory,  where  directory is where you want to go. The behavior of this com-
  200. mand depends to some extent on which kind of operating system you're using.  On
  201. some  systems,  when  you  CD within ED and then leave ED, the operating system
  202. puts you back where you were when you ran ED. Other systems leave you where you
  203. last CD'ed to.
  204.  
  205. 1 changing_case
  206.  
  207. The CHGCAS key changes the case of either the select range (if it  is  active),
  208. the search string (if the cursor is sitting on it), or the character the cursor
  209. is on (if neither of the first two options apply).  The  default  behavior  for
  210. this key is the same as EDT's, but ED allows other options. You can use the SET
  211. CASE command to change the behavior of CHGCAS. See the help  on  SET  CASE  for
  212. more information.
  213.  
  214. 1 commands
  215.  
  216. To get into command mode, do either GOLD [7] or press control-Z. You will get a
  217. Command>  prompt. Enter the command you want to use, and press RETURN or ENTER.
  218. If you go into command mode by mistake and you want to go on editing, just  hit
  219. RETURN  (an  empty  command is ignored). Note that as soon as ED finds a unique
  220. match on the command name you type in, it ignores any further characters in the
  221. command.
  222.  
  223. The valid commands are:
  224.  
  225.  HELP               BYTE
  226.  EXIT QUIT ABORT    TRIM
  227.  INCLUDE WRITE      CD PWD
  228.  SET SHOW           BIGGER SMALLER
  229.  STORE RESTORE      LOAD UNLOAD
  230.  DATE TIME FILE     SORT
  231.  CALCULATE          DELETE
  232.  GREP PERG          BOOKMARK
  233.                     SUBSTITUTE
  234.  
  235. To get help on a particular command, respond to the Command> prompt with
  236.  
  237. HELP command-name
  238.  
  239. 1 defining_keys
  240.  
  241. Editing tasks tend to be repetitive, so most editors allow you  to  store  some
  242. sequence  of  editor  commands  "under" a key, so that when you want to do that
  243. sequence of operations, all you have to do is hit that  key.  This  storage  of
  244. commands is called "defining" the key. Some keys are so essential to the proper
  245. functioning of ED that they cannot be defined. The ones  that  can  be  defined
  246. are:
  247.  
  248. o  Keypad keys (except for GOLD)
  249. o  Any GOLD-alpha combination (like GOLD-Q, for instance)
  250. o  Any control key other than ^K, ^Q, or ^S
  251. o  Any user function key (see help on 'terminals')
  252. o  Any alphanumeric key (see help on 'alpha_keys')
  253.  
  254. To define a key, first hit control-K (press the K key while  holding  down  the
  255. Ctrl  key).  Then press the key you want to define (any of the above keys). Now
  256. you can edit your file as you usually do, but ED will record each keystroke you
  257. make.  When you get done defining the key, hit control-K again. That will store
  258. the keystroke sequence under the defined key. For the remainder of your editing
  259. session,  each time you press the key you defined, the entire sequence of keys-
  260. trokes you entered will be played out.
  261.  
  262. 2 alpha_keys
  263.  
  264. Certain restrictions apply when  you  are  defining  main  keyboard  keys.  For
  265. example,  if  you were using a text processor and wanted to have a key like 'a'
  266. to come out as '^a/', ED might take the 'a' in the result string as  a  command
  267. to  put  the  whole  string out again. This kind of "recursion" would make life
  268. difficult, so some special rules apply when you are using defined  alphanumeric
  269. keys:
  270.  
  271. o  alphanumeric defined keys are not recursive.
  272.  
  273. o  alphanumeric keys do not evolve into their definitions they are used  within
  274.    another definition.
  275.  
  276. o  alphanumeric keys do not evolve into their definitions when you type them in
  277.    response to any editor prompt. (You have to be able to communicate with ED!)
  278.  
  279. 2 saving_keys
  280.  
  281. After you have defined some keys, you can save the definitions by entering com-
  282. mand  mode  and  responding to the Command> prompt by entering STORE KEYS. This
  283. will cause ED to create a new version of your editor startup  file,  and  store
  284. all  of  your  currently active key definitions in that file. ED will automati-
  285. cally retrieve these key definitions from this file whenever you start it up.
  286.  
  287. 2 restoring_keys
  288.  
  289. If you have been messing around with your key  definitions,  and  you  want  to
  290. restore  them  to  their original values, enter command mode and respond to the
  291. Command> prompt by entering RESTORE KEYS. This will cause ED to  read  in  your
  292. standard  definitions  from your startup file and reset all the key definitions
  293. accordingly.
  294.  
  295. 2 undefining_keys
  296.  
  297. To remove any definition from a key, hit control-K, press the key you  want  to
  298. remove  the definition from, and hit control-K again. This will make the key do
  299. whatever it ordinarily does.
  300.  
  301. 1 DELETE
  302.  
  303. The DELETE command works only when you are editing a directory. In  this  mode,
  304. you can mark files for deletion by hitting DELLINE (or using the CUT command on
  305. a set of files). The marked files will appear in reverse video. Once  you  have
  306. marked  the  files you want to delete, you issue the DELETE command. ED deletes
  307. the marked files and redisplays the directory.
  308.  
  309. 1 DATE
  310.  
  311. The DATE command loads the paste buffer with the current  date  in  the  format
  312. DD-MMM-YY, where DD is the day of month, MMM is the month, and YY is the year.
  313.  
  314. You can use the single letter D as an abbreviation for DATE.
  315.  
  316. 1 environment_vars
  317.  
  318. ED optionally uses two environment variables to specify the number of rows  and
  319. columns  on  the  screen  as defaults  if the  values on  the command  line are 
  320. specified as zero.  ROWS is an integer value containing the  number of lines on
  321. the screen, and COLS is an integer value containing the screen width.
  322.  
  323. ED will also replace environment variables imbedded in file names (both in file
  324. prompts and in the user setup file) if they are preceeded by a $.  For example,
  325. a file specified as  $HOME/test.dat  on an ED internal prompt would be expanded
  326. the same way as the shell would expand it in unix.  The special substitution ~/
  327. at the start of a file name is translated to the  "HOME"  environment variable.
  328. If the string following a $ is not a valid environment variable no modification
  329. is made to the file name.
  330.  
  331. Environment variable substitution is not available on VMS, and  does not handle
  332. ~username type syntax on any systems.
  333.  
  334. 1 EXIT
  335.  
  336. Creates a new version of the file you are currently editing, incorporating  all
  337. the changes you have made.
  338.  
  339. If you are using the -k backup option, you can suppress creating the backup for
  340. this file using the -n option. For example, EXIT -n will not save the old file.
  341. This is  sometimes useful  if you  want to  save the  contents of  the previous
  342. backup file.
  343.  
  344. You can use the single letter E as an abbreviation for EXIT.
  345.  
  346. 1 features
  347.  
  348. ED will:
  349.  
  350. o  Display many files on the screen simultaneously (see windows).
  351. o  Let you edit files and directories on other systems (see FTP).
  352. o  Save key definitions and other editor settings on command (see STORE).
  353. o  Let you mark your spot in a file, and return to it easily (see MARK).
  354. o  Let you put tab stops wherever you want them (see tabs).
  355. o  Let you use wildcards or regular expressions in search strings (see search).
  356. o  Let you redefine the keys on your terminal (see defining_keys).
  357. o  Let you say things like: ED *.dat, if you want to edit all .dat  files  (see
  358.    wildcards).
  359. o  Allow you to teach it how to talk to different terminals (see terminals).
  360. o  Calculate the value of algebraic expressions  that  include  math  functions
  361.    (see CALCULATE).
  362. o  Sort a file or a portion of a file (see SORT).
  363.  
  364. 1 FILE
  365.  
  366. The FILE command loads all or part of a file name into the  paste  buffer.  The
  367. behavior of this command depends on whether you are in a diredit buffer or in a
  368. file. If you are in a diredit buffer, ED takes  the  name  of  the  buffer  and
  369. splices  the filename the cursor is on onto the end of it. If you're in a file,
  370. ED uses the file name.
  371.  
  372. Once ED has built the file name as described above, it puts all or part of  the
  373. name into the paste buffer, according to the following plan:
  374.  
  375. If you say FILE DIRECTORY, it puts only  the  directory  name  into  the  paste
  376. buffer.
  377.  
  378. If you say FILE NAME, it strips off the directory and puts only the  file  name
  379. in the paste buffer.  Note that FILE by itself is the same as FILE NAME.
  380.  
  381. If you say FILE FULL, it puts the entire name into the paste buffer.
  382.  
  383. You can abbreviate the FILE command as F. You can abbreviate  DIRECTORY  as  D,
  384. NAME as N, and FULL as F.
  385.  
  386. 1 ftp
  387.  
  388. ED is capable of manipulating files  on  other  systems,  using  the  FTP  file
  389. transfer  protocol. If you are connected to a network that supports TCP/IP, you
  390. can specify directories and files on other systems by using one  the  following
  391. syntaxes:
  392.  
  393. /host.xxx.yyy:/dir1/dir2...
  394.  
  395. or
  396.  
  397. /user@host.xxx.yyy:/dir1/dir2...
  398.  
  399. If you use the form that includes the username, ED  will  prompt  you  for  the
  400. password.  If  the filename you specify is a directory, you will go into direc-
  401. tory mode. Otherwise, the specified file will be retrieved using ASCII transfer
  402. mode, or BINARY mode if you specified -b when you named the file.
  403.  
  404. If you leave the directory/filename off completely, the root directory for  FTP
  405. will  be  where you end up (in directory mode). This may not work on certain VM
  406. systems that require you to know a directory name.
  407.  
  408. Note that FTP servers on non-Unix systems are not very  well  standardized.  If
  409. you  try  to  open a remote file or directory, and nothing happens for a while,
  410. wait a bit longer. You should eventually (perhaps after about one minute) get a
  411. timeout  message if the connection fails. You may get other messages, depending
  412. on the situation. In general, you should either connect to the host or get some
  413. kind of message.  If neither happens, write to sandmann@clio.rice.edu,  telling
  414. what kind of system you were running ED on, what kind of system you were trying
  415. to  connect  to, and what message(s) appeared on your terminal. (If you're on a
  416. Unix system, you may be able to use the 'script' command to capture this infor-
  417. mation.)
  418.  
  419. There are FTP servers out there that are simply horrible and ED cannot help you
  420. much with them. ED currently understands about a dozen different server styles,
  421. but surely there are more out there. If ED is unable to get file permissions or
  422. modification  dates, it uses ????????? for the permissions and 2-Feb-1955 06:35
  423. for the modification date. (The ????????? does not necessarily mean you  cannot
  424. access the file. You just have to try it.)
  425.  
  426. Note that you can interrupt the FTP transfer of a file (or a directory listing)
  427. by  typing ^C. The file (or directory listing) will still appear on the screen,
  428. but it won't be complete.
  429.  
  430. When talking to FTP servers, ED classifies the remote machine into one  of  two
  431. groups,  which  have different syntaxes. Windows NT, MS-DOS, OS/2 and Unix sys-
  432. tems all look like unix systems, that is, filenames  look  like  /a/b/c...  All
  433. other  systems  (including  VMS,  VM  and  MTS)  look  like  VMS systems, where
  434. filenames look like DEVICE:[DIRECT.DIRECT1...]. You can't send a  VMS-emulating
  435. system  a  unix  filename  and  expect it to work. The easiest way to deal with
  436. remote systems when you don't know which kind they  are,  is  to  just  specify
  437. /hostname: (or /user@hostname:). This will put you in the default directory for
  438. the account you specify, and the top row of the window will display the  system
  439. type  in  parentheses.  It's  pretty  obvious,  once  some  filenames have been
  440. displayed, which kind of beast you're talking to.
  441.  
  442. 1 GREP
  443.  
  444. The GREP command searches through an entire file, looking for a string that you
  445. supply.  It  produces  a  new  window that shows each appearance of the string,
  446. along with (optionally) indications of how many intervening lines did not  con-
  447. tain the string. The syntax is:
  448.  
  449. GREP string
  450.  
  451. You can control whether GREP displays intervening line counts by using the  SET
  452. GREP  command. See the help on SET GREP for more about this. You can abbreviate
  453. the GREP command as G. Note that there is a command that does the  opposite  of
  454. what GREP does, called PERG.
  455.  
  456. 1 HELP
  457.  
  458. The HELP command makes  ED  provide  information  about  various  features  and
  459. issues.  The command works as follows:
  460.  
  461. o  If you just type HELP, you get a list of topics, and it  waits  for  you  to
  462.    type in a topic name.
  463.  
  464. o  When you type in a topic name, ED displays the  help  information,  and  may
  465.    print  a list of subtopics. You can select one of these by typing the subto-
  466.    pic name in.  At this point, you would be  "one  level  down"  in  the  HELP
  467.    hierarchy.  Hitting  RETURN  without  typing  any  topic moves you up in the
  468.    hierarchy.
  469.  
  470. o  Hitting RETURN at the top level gets you out of HELP.
  471.  
  472. o  You can specify a chain of topic names in a HELP command: HELP DEFI ALP, for
  473.    example,   would  get  you  in  the  subtopic  'alpha  keys'  of  the  topic
  474.    'defining_keys'.
  475. 1 INCLUDE
  476.  
  477. The INCLUDE command inserts an entire file at the current location in the  file
  478. you're  editing.  The command syntax is INCLUDE filename. Wildcards are allowed
  479. in the file name; the first matching file ED finds  is  the  one  it  includes.
  480. Default  extensions  (from  your startup file) will be applied if filename does
  481. not have an extension.
  482.  
  483. You can use the single letter I as an abbreviation for INCLUDE.
  484.  
  485. 1 invoking_ed
  486.  
  487. When you invoke ED, you must specify a number of parameters so it knows how  to
  488. talk  to  your  terminal,  where  to  get  your key definitions, and so on. The
  489. required parameters are, in order:
  490.  
  491.    1  The terminal file name that is appropriate for your terminal.
  492.    2  The name of your personal startup file.
  493.    3  The number of lines on your terminal screen.
  494.    4  The number of columns on your terminal screen.
  495.    5  (Optionally) one of the options listed under the 'options' subtopic.
  496.    6  (Optionally) the name of the file you want to edit, or -ffilename,  where
  497.       filename is a file that contains a list of files you want to edit. If you
  498.       specify -f without a filename, a list of file names is read from standard
  499.       input  (which  lets  you do some pretty amazing things under systems that
  500.       support pipes).
  501.  
  502.       If you don't provide a file-to-edit, ED will  prompt  you  for  one.  The
  503.       modifiers described above are ignored when you respond to prompts.
  504.  
  505. The parameters must be separated by spaces. Ordinarily, there will be a  symbol
  506. or alias defined when you log in that takes care of the first four parameters.
  507.  
  508. 2 filenames
  509.  
  510. If you start ED and don't supply a filename, it will prompt you for one as fol-
  511. lows:
  512.  
  513. File>
  514.  
  515. If you don't want to edit after all, hit RETURN to get out.
  516.  
  517. You can enter more than  one  filename  at  once  if  you  like.  Separate  the
  518. filenames  with  spaces. If you want to edit a file whose name contains spaces,
  519. enclose the name in double  quotes  (e.g.:  "this is a filename").  To  put  an
  520. actual  double  quote  in the file name, use \". To put a backslash in the file
  521. name, use \\. For example, if the file's name were:
  522.  
  523. this is a long spacey file name with "double quotes"
  524.  
  525. you would name the file as:
  526.  
  527. "this is a long spacey file name with \"double quotes\""
  528.  
  529. You can precede a filename with -f and ED will treat that file  as  a  list  of
  530. filenames that you want it to edit in sequence.
  531.  
  532. You can use wildcards in the filename if you wish. The implementation  of  this
  533. varies  from  system to system. On AIX systems, for example, there is a system-
  534. defined limit on the number of file names that can be expanded by the shell. In
  535. VMS,  however,  the  wildcards are handled within ED and there is no limit. See
  536. the help on 'wildcards' for a complete description of wildcard processing.
  537.  
  538. When you are editing from a list, or from a wildcarded file name, you may  want
  539. to  stop the list or wildcard processing. To do this, see the help on the ABORT
  540. command.
  541.  
  542. When the file name you specify is a directory file, ED goes  into  a  'diredit'
  543. mode. In this mode, ED displays a list of all the files in the directory, along
  544. with the size of each file (in bytes), its last-modification date and time, its
  545. permissions, and an indication of whether it is a directory (directories have a
  546. 'd' character in the first column). You can move around in the file list in the
  547. usual  way  - as far as ED is concerned, it's just another buffer (with certain
  548. limitations, see below).
  549.  
  550. To view a file, move the cursor to the line containing the file name, and press
  551. 'a'  if  the  file  is ASCII, or 'b' if it is a binary file. This creates a new
  552. window with the file in it. If the file you hit 'a' or 'b' on is  a  directory,
  553. ED 'moves' to that directory and gives you a new file list. You can move up one
  554. level in the file system by hitting 'a' or 'b'  when  the  cursor  is  on  '..'
  555. (unix)  or  '[-]'  (VMS).  For  moving  around  directories,  'a'  and  'b' are
  556. equivalent; the distinction between them applies only  when  visiting  a  file.
  557. Note that you can use the RETURN key as a substitute for the 'a' key.
  558.  
  559. Certain limitations apply to directory-mode buffers: you  can't  edit  them  by
  560. inserting  or  deleting characters, and you can't use the INCLUDE, WRITE, BYTE,
  561. TRIM or SUBSTITUTE commands. (You can, however, SORT them).
  562.  
  563. If you are connected to the Internet, you can edit files on other systems  with
  564. ED. See the help topic FTP for more about this.
  565.  
  566. 2 options
  567.  
  568.  -r or
  569.  -rfilename  specifies that ED should go into recovery mode,  in  which  editor
  570.              commands are taken from a journal file instead of the terminal. If
  571.              you leave off the filename, ED takes  commands  from  the  default
  572.              journal file, which is defined in your ED startup file.
  573.  -t or
  574.  -tfilename  same as -r, except that no terminal i/o is performed, and ED quits
  575.              when  it gets to the point where it would ask you for another file
  576.              to edit. This option is good  for  text  processing  applications,
  577.              where  you  are  using  a  journal  file  to  control some kind of
  578.              automatic text processing on a file.
  579.  -f or
  580.  -ffilename  makes ED treat the specified file as a list of names of  files  to
  581.              edit,  which ED opens one after another. If filename is not speci-
  582.              fied, ED reads file names from the standard input (on non-VMS sys-
  583.              tems).
  584.  -k or
  585.  -kdirname   makes ED keep a backup copy of any files it updates  on  disk.  If
  586.              you  use  just -k, the backup file is called whatever the file was
  587.              called, with the extension changed to ".BAK".  If  you  specify  a
  588.              directory  (e.g.:  -k~/trash) the old version of the file is moved
  589.              to that directory, and its name remains unchanged.
  590.  
  591.  -sstring    lets you specify the current search string.
  592.  
  593.  -pstring    lets you specify the contents of the paste buffer.
  594.  
  595.  -lstring    lets you specify the contents of the line buffer.
  596.  
  597.  -wstring    lets you specify the contents of the word buffer.
  598.  
  599.  -cstring    lets you specify the contents of the char buffer.
  600.  
  601.  -v          prints ED's version number and licensing information, then quits.
  602.  
  603.  -u          makes ED display the cursor position constantly.
  604.  
  605.  -b          makes ED go into 'binary' mode. Use this to edit binary files.
  606.  
  607.  -h          makes ED go into 'hex' mode, which is  identical  to  binary  mode
  608.              except that all characters appear in <hex> format.
  609.  
  610.  -1          prevents prompting for additional files (one pass mode).
  611.  
  612.  -m          makes ED go into 'multiple-file' mode. When you use -m,  ED  tries
  613.              to  open all the files you specify at once, in multiple windows on
  614.              the screen. If there are more files than will fit on  the  screen,
  615.              it  opens as many as it can, and then opens more after you EXIT or
  616.              QUIT. You can break out of multiple-file mode by using  the  ABORT
  617.              command.
  618.  
  619.  -innn       makes ED move the cursor to line nnn of the file  when  it  starts
  620.              up. Line 1 is the first line of the file.
  621.  
  622.  -z          makes ED go into a special 'tutorial' mode, where you can teach it
  623.              about  your keyboard. In this mode, ED prompts you for the name of
  624.              an existing configuration file (use one that you think might  work
  625.              marginally  with your terminal) and then asks you to press all the
  626.              key combinations it understands, followed by the  RETURN  key.  It
  627.              then  creates  a new configuration file (which you name) that will
  628.              work with the particular keyboard you're using. We generally  keep
  629.              our  configuration files in the same directory where ED lives, but
  630.              that isn't necessary, since the configuration file is one  of  the
  631.              command-line arguments you specify when you run ED.
  632.  
  633. 1 keypad
  634.  
  635. This is the arrangement of the keys on the keypad. The arrow  keys  (UP,  DOWN,
  636. RIGHT,  LEFT)  are  not shown, since they are pretty much self-explanatory, and
  637. they appear in all sorts of different places.
  638.  
  639.  +-------+-------+-------+-------+
  640.  |       |WINDOW | FIND  | UNDL  | The upper entry on each key gives the
  641.  | [PF1] | [PF2] | [PF3] | [PF4] | function of that key if GOLD is pressed
  642.  | GOLD  | CLONE |FNDNXT | DELL  | immediately before the key is pressed. The
  643.  +-------+-------+-------+-------+ lower entry is the function if only the key
  644.  |COMMAND| FILL  |REPLACE| UNDW  | itself is pressed. The two-stroke sequence,
  645.  |  [7]  |  [8]  |  [9]  |  [-]  | GOLD-key, is treated as one keystroke by ED.
  646.  | PAGE  |SECTION|APPEND | DELW  |
  647.  +-------+-------+-------+-------+ Note that keyboards may vary. Sparcs, for
  648.  |BOTTOM |  TOP  | PASTE | UNDC  | example, have no [,] key, so that function
  649.  |  [4]  |  [5]  |  [6]  |  [,]  | appears under the [Pause] key, the [-] key
  650.  | FORW  | BACKW |  CUT  | DELC  | is the UNDL/DELL key, and the [+] key is
  651.  +-------+-------+-------+-------+ the UNDW/DELW key. Of course, you can cust-
  652.  |CHGCASE|DELEOL |SPECINS| SUBST | omize all this by creating your own terminal
  653.  |  [1]  |  [2]  |  [3]  |       | description file.
  654.  | WORD  |  EOL  | CHAR  |       |
  655.  +-------+-------+-------+[Enter]|
  656.  |   OPENLINE    | RESET |       |
  657.  |      [0]      |  [.]  |       |
  658.  |   NEXTLINE    |SELECT | ENTER |
  659.  +---------------+-------+-------+
  660.  
  661. 2 details
  662.  
  663. This section contains detailed descriptions of  the  functions  of  the  keypad
  664. keys. In general, it is important to understand that each key has two functions
  665. built in. You get one function (the lower one in the diagram) if you just press
  666. the  key.  You get the other function if you press the GOLD key, and then press
  667. the key. So when we say something like "press SUBST," we mean 1) press the GOLD
  668. key, and 2) press the key at lower right on the keypad.
  669.  
  670. It is also important to understand that many of the cursor movement  keys  have
  671. "forward"  and  "backward"  modes,  which  depend  on which "direction" you are
  672. going. The FORW and BACKW keys set this direction. So, to move forward  in  the
  673. file  one  word  at  a  time,  you  would first press FORW, and then press WORD
  674. repeatedly. The current direction also determines which way ED  goes  when  you
  675. initiate a search for a string of characters.
  676.  
  677. 3 UP
  678.  
  679. Moves the cursor to the previous record in the file.
  680.  
  681. 3 DOWN
  682.  
  683. Moves the cursor to the next record in the file.
  684.  
  685. 3 RIGHT
  686.  
  687. Moves the cursor one character to the right. If the cursor is at the end  of  a
  688. record, it moves to the start of the next record in the file.
  689.  
  690. 3 LEFT
  691.  
  692. Moves the cursor one character to the left. If the cursor is at the start of  a
  693. record, it moves to the end of the previous record in the file.
  694.  
  695. 3 NEXTLINE
  696.  
  697. If the current direction is forward, moves the cursor to the beginning  of  the
  698. next  line.  If  backward, moves the cursor to the start of the current record,
  699. unless it is already there, in which case it moves to the start of the previous
  700. record.
  701.  
  702. 3 OPENLINE
  703.  
  704. If the cursor is at the start of a record, creates a new, empty record.  Other-
  705. wise, splits the current record in two.
  706.  
  707. 3 WORD
  708.  
  709. Moves to the next word in the current direction.  You  define  what  characters
  710. delimit words by using the SET WORD command.
  711.  
  712. 3 CHGCASE
  713.  
  714. Changes the case of characters in one of three ways:
  715.  
  716.    1  If a select range is defined, the characters in the range are changed.
  717.  
  718.    2  Otherwise, if you are on the current search string, the case of the char-
  719.       acters in the string is changed.
  720.  
  721.    3  Otherwise, the case of one character is changed, and the cursor moves one
  722.       character in the current direction.
  723.  
  724. You can alter the way case-changing works by using the SET  CASE  command.  See
  725. the help on SET CASE for more info.
  726.  
  727. 3 EOL
  728.  
  729. If the current direction is forward, moves the cursor to the end of the current
  730. record,  or  the  end  of  the  next  record if it is already at the end of the
  731. current record. If backward, moves to the end of the previous record.
  732.  
  733. 3 DELEOL
  734.  
  735. Deletes from the cursor to the end of the current record. If the cursor  is  at
  736. the  end  of  the  current  record,  nothing happens. Note that DELEOL does not
  737. delete the line break itself, as DELL does. Any deleted characters  are  stored
  738. in the LINE buffer, and can be reinserted with the UNDL command.
  739.  
  740. 3 CHAR
  741.  
  742. Moves one character in the current direction.
  743.  
  744. 3 SPECINS
  745.  
  746. Inserts any eightbit character. For example, to insert a DEL  character,  press
  747. GOLD,  then  enter  127  using  the numeric keys on the main keyboard, then hit
  748. SPECINS.
  749.  
  750. 3 FORW
  751.  
  752. Sets the current direction to forward.
  753.  
  754. 3 BOTTOM
  755.  
  756. Moves to the end of the file.
  757.  
  758. 3 BACKW
  759.  
  760. Sets the current direction to backward.
  761.  
  762. 3 TOP
  763.  
  764. Moves to the beginning of the file.
  765.  
  766. 3 CUT
  767.  
  768. If a select range is defined, deletes it. Otherwise, if the cursor  is  on  the
  769. search  string,  deletes  that.  The deleted characters are stored in the PASTE
  770. buffer, and can be reinserted using the PASTE command. This operation is  often
  771. called "killing," and PASTEing is called "unkilling."
  772.  
  773. 3 PASTE
  774.  
  775. Inserts the contents of the PASTE buffer at the cursor position.  See  CUT  for
  776. more information.
  777.  
  778. 3 PAGE
  779.  
  780. Moves to the beginning of the next or previous page, depending on  the  current
  781. direction.  Pages  are defined by means of a "page delimiter string," which you
  782. can control with the SET PAGE command.
  783.  
  784. 3 COMMAND
  785.  
  786. Lets you enter editor commands. Try HELP to get started.
  787.  
  788. 3 SECTION
  789.  
  790. Moves the cursor one "section" in the current direction. This is eighteen lines
  791. by default, and you can change it with the SET SECTION command.
  792.  
  793. 3 FILL
  794.  
  795. Performs word fill on the select range. The right margin is controlled  by  the
  796. SET WRAP command.
  797.  
  798. 3 APPEND
  799.  
  800. This command is like CUT, except that what gets killed is  appended  to  what's
  801. already in the PASTE buffer, rather than replacing it.
  802.  
  803. 3 REPLACE
  804.  
  805. This command requires that the cursor be on the search string.  If  it  is,  it
  806. deletes  the search string and inserts the contents of the PASTE buffer at that
  807. spot. The SUBST command is similar, but it automatically takes you to the  next
  808. appearance of the search string.
  809.  
  810. 3 DELW
  811.  
  812. Deletes from the cursor to the start of the next word in the file. The  deleted
  813. character  are  stored in the WORD buffer, and can be reinserted using the UNDW
  814. command.
  815.  
  816. 3 UNDW
  817.  
  818. Inserts the contents of the WORD buffer at the cursor position.
  819.  
  820. 3 DELC
  821.  
  822. Deletes one character at the cursor position, storing it in  the  CHAR  buffer.
  823. The character can be reinserted using the UNDC command.
  824.  
  825. 3 UNDC
  826.  
  827. Inserts the contents of the CHAR buffer at the cursor position.
  828.  
  829. 3 SELECT
  830.  
  831. Marks one end of the "select range," which is defined  as  all  the  characters
  832. between this mark and the cursor position. You use this to kill large blocks of
  833. text: 1) move somewhere and press SELECT, 2) move somewhere else, 3) press CUT.
  834. Everything  from  the  SELECT  spot  to the cursor is killed, and stored in the
  835. PASTE buffer. ED marks the SELECT position with a little reverse-video box.  If
  836. a  SELECT  spot  is  already  defined, and you press SELECT somewhere else, the
  837. first selection goes away. You don't have to use RESET, as you do with EDT.
  838.  
  839. 3 RESET
  840.  
  841. Turns off the select range. Does nothing if you haven't SELECTed a spot.
  842.  
  843. 3 SUBST
  844.  
  845.  
  846. The SUBST key deletes the search string, replaces it with the contents  of  the
  847. paste buffer, and then searches for another occurrence of the search string. To
  848. use the SUBST key, enter the following commands:
  849.  
  850.    1  Press FIND
  851.    2  Enter the text you want to replace.
  852.    3  Press FORW or BACKW, to set the  search  direction  and  find  the  first
  853.       occurrence of the string.
  854.    4  Press SELECT.
  855.    5  Type the text you want to replace the search string with.
  856.    6  Press CUT.
  857.    7  Press SUBST.
  858.  
  859. Each time you press SUBST, ED will make a  substitution  and  locate  the  next
  860. occurrence  of  the search string. You can use a repeat count for multiple sub-
  861. stitutions.
  862.  
  863. This command requires that the cursor be on the search  string.  Hitting  SUBST
  864. when you are not on the search string does nothing.
  865.  
  866. 3 CLONE
  867.  
  868. Alters the behavior of any immediately following  kill-type  command,  so  that
  869. what  would  have  been  killed  remains  in the file, but the 'killed' area is
  870. copied to the appropriate kill buffer just as it normally is when you kill.
  871.  
  872. 3 WINDOW
  873.  
  874. Puts you in window command mode. See the help on windows for more information.
  875.  
  876. 3 FNDNXT
  877.  
  878. Finds the next appearance of the search string, seeking in the  current  direc-
  879. tion. Beeps if it is not found, otherwise moves the cursor there.
  880.  
  881. 3 FIND
  882.  
  883. Initiates a search with a new search string. To  find  something,  do  a  FIND,
  884. enter  the  string, then press FORW to search forward, or BACKW to search back-
  885. ward.  You  can  recall  previously-typed  search  strings.  See  the  help  on
  886. recall_commands for some tips about this.
  887.  
  888. 3 DELL
  889.  
  890. Deletes  from the  cursor to  the end  of the  current record,  and  splices the  
  891. following record onto the current record.  The deleted characters  are stored in
  892. the LINE buffer, and can be reinserted using the UNDL command.
  893.  
  894. 3 UNDL
  895.  
  896. Inserts the contents of the LINE buffer at the cursor position.
  897.  
  898. 1 license
  899.  
  900. ED is an enhanced EDT-like editor, Copyright (C) 1992 by Rush Record (author).
  901. Copyright (C) 1993 by Charles Sandmann (sandmann@clio.rice.edu) maintainer.
  902.  
  903. ED is free software; you can redistribute it and/or modify it under the terms
  904. of the GNU General Public License as published by the Free Software Foundation.
  905.  
  906. ED is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  907. without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  908. PARTICULAR PURPOSE.  See the GNU General Public License for more details.
  909.  
  910. You should have received a copy of the GNU General Public License (COPYING)
  911. along with this program; if not, write to:
  912. The Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  913.  
  914. If you did not receive a copy of the source code and would like a copy, or
  915. have questions or comments please email or write to:
  916.    Charles Sandmann (sandmann@clio.rice.edu)
  917.    527 Asheboro
  918.    Katy, TX  77450
  919. 1 LOAD
  920.  
  921. The LOAD command loads key definitions from  an  unload  file,  which  you  can
  922. create using the UNLOAD command. The ordinary sequence of operations is: 1) you
  923. use the UNLOAD command to create a listing of your key definitions, 2) you edit
  924. that  file  as  you  see  fit,  and 3) you use the LOAD command to load the key
  925. definitions from that file. You would then ordinarily STORE KEYS  to  make  the
  926. changes permanent (after you tested the defined keys, of course).
  927.  
  928. The syntax of the command is LOAD filename, where filename is the name  of  the
  929. file containing the key definition listing.
  930.  
  931. You can abbreviate the LOAD command as L.
  932.  
  933. 1 mark
  934.  
  935. The MARK and RETURN keys allow you to mark your place in a file and then return
  936. to it after you've been doing things elsewhere.
  937.  
  938. When you hit MARK, your current cursor position is stored. If you go  somewhere
  939. else  in  your  file,  then  hit RETURN (the special 'RETURN' key, not carriage
  940. return), you will move back to the last spot you marked. If you are on a marked
  941. spot,  and  hit MARK, that spot will be un-marked. If you have marked more than
  942. one spot, and you hit RETURN repeatedly, you will cycle among the marked spots.
  943.  
  944. On some terminals, these functions are defined as follows: MARK is  GOLD  <down
  945. arrow>,  RETURN  is  GOLD <up arrow>. On the sparc, however, MARK is the 'Stop'
  946. key, and RETURN is the 'Again' key.
  947.  
  948. You can have up to eight spots marked at any time.
  949.  
  950. 1 newsreader
  951.  
  952. ED has a built-in network newsreader facility, which is enabled by  running  ED
  953. in one of the following ways:
  954.  
  955. ED -n <news-server-hostname>
  956. ED -N <news-server-hostname>
  957.  
  958. If you use -n, ED will display only those newsgroups you are subscribed to  (as
  959. indicated  in your .newsrc file). If you use -N, ED displays all the newsgroups
  960. your server knows about, signifying the unsubscribed groups by displaying  them
  961. in reverse video.
  962.  
  963. I have tried to keep the user interface simple; except for  Posting,  you  need
  964. only  know  two  commands: 'read' (by typing 'r' or 'R') and 'visit' (by typing
  965. 'v' or 'V') The difference between read and visit is the read displays a  group
  966. or article, but leaves the cursor where it was. Visit, on the other hand, moves
  967. the cursor to the just-created window.
  968.  
  969. The following topics describe the newsreader's user interface.
  970.  
  971. 2 group_window
  972.  
  973. When you invoke the ED newsreader, it displays newsgroups in  what  we'll  call
  974. the  'group  window'.  This  window is much like a diredit window, in that only
  975. certain keys have any valid function. All the cursor movement keys function  in
  976. the  normal  way.  FIND and FINDNXT also work as you would expect. Inserting or
  977. deleting text, however, is not allowed. As with diredit mode, DELLINE and  KILL
  978. will mark a group or set of groups in reverse video. Normal video means you are
  979. subscribed to a group, reverse means unsubscribed. Reapplying DELLINE  or  KILL
  980. will turn reversed groups into normal ones.
  981.  
  982. To select a group, press 'r', 'R', 'v' or 'V'. This will make  ED  display  the
  983. articles  of  that  group  in  another window, called the 'article window'.  If
  984. there are more than 50 articles in the group, ED will ask you how many you want
  985. it  to list in the article window. If you just hit RETURN here, ED reads all of
  986. them. If you enter a number, say N, ED reads the first N articles. If you enter
  987. a  range  of  numbers, say N-P, ED skips the first N-1 articles, and then reads
  988. the next P-N+1 articles.
  989.  
  990. The 'r' and 'R' commands leave the cursor in the group window after the article
  991. list has been displayed. 'v' and 'V' automatically move the cursor to the start
  992. of the article list.
  993.  
  994. If you use an uppercase command ('R' or 'V') to call up the article window,  ED
  995. displays  all  of the articles in the group, even the ones you've already read.
  996. In this case, the already-read articles are indicated in reverse video. If  you
  997. use lowercase, only the unread articles are displayed.
  998.  
  999. See the help topic 'article_window' for a description  of  the  article  window
  1000. interface.
  1001.  
  1002. 2 article_window
  1003.  
  1004. Article windows have a columnar display. The first  column  shows  the  article
  1005. number.  The  second  lists the name of the person who posted the article.  The
  1006. third column shows the posting date. The fourth column indicates how many lines
  1007. of  text  there are in the body of the article. The fifth column shows the sub-
  1008. ject of the article. The subject text may be preceeded by a number of '=' char-
  1009. acters,  which  signify  that the article is a response to another article. One
  1010. '=' means it is a response to a top-level article. Two '='s mean a response  to
  1011. a response to a top-level article, and so on.
  1012.  
  1013. The key functions for the article window are the same as for the group  window,
  1014. except  that there is a 'p' command (for posting an article).  To read an arti-
  1015. cle, move the cursor to it and press 'r', 'R', 'v' or  'V'.   The  behavior  is
  1016. much  like  the  group  window's interface: 'r' and 'R' call up the article but
  1017. leave the cursor where it was. 'v' and 'V' move the cursor into the article.
  1018.  
  1019. The uppercase commands ('R' and 'V') cause ED to display the  article's  header
  1020. information. The lowercase commands ('r' and 'v') leave the header off.
  1021.  
  1022. When you select an article, ED creates a new window and displays the article in
  1023. it.  This window is a regular ED window, like what you get when you edit a text
  1024. file. All the keys function normally here.
  1025.  
  1026. Every time you read an article, ED changes the line in the  article  window  to
  1027. reverse  video so you don't have to read it in the future. If you read the same
  1028. article again, ED returns the line in the article window to normal,  which,  in
  1029. effect,  marks the article as unread again. You can also use DELLINE to reverse
  1030. or un-reverse a line. You can use KILL to do the same to a range of articles.
  1031.  
  1032. 2 posting
  1033.  
  1034. You post articles by typing 'p' when the cursor is in the article list. If  the
  1035. cursor  is  on  an  article, your posting will be treated as a followup to that
  1036. article; If it is on <end>, it will be a new posting.
  1037.  
  1038. When you type 'p', a new window will appear, with header information,  and  (if
  1039. it's a followup) a copy of the article the cursor was on, indented with "> " on
  1040. each line. You can freely edit anything below the  header  (you  can  edit  the
  1041. header, if you know how to do it without breaking anything). When you get done,
  1042. type control-Z and enter EXIT if you want to go ahead and post, or QUIT if  you
  1043. want  to just skip it. These commands won't pop you out of ED, they only affect
  1044. whether the article is actually posted.
  1045.  
  1046. 2 EXIT_vs._QUIT
  1047.  
  1048. When you get done reading the news, you must use the EXIT command if  you  want
  1049. to  save a new .newsrc file (indicating changes in group subscription, or arti-
  1050. cle read/unread state). If you QUIT, your .newsrc remains unchanged.
  1051.  
  1052. 1 PERG
  1053.  
  1054. The PERG command searches through an entire file, looking for a string that you
  1055. supply. It produces a new window that shows each line that does not contain the
  1056. string, along with (optionally) indications of how many intervening  lines  did
  1057. contain the string. The syntax is:
  1058.  
  1059. PERG string
  1060.  
  1061. You can control whether PERG displays intervening line counts by using the  SET
  1062. GREP  command. See the help on SET GREP for more about this. You can abbreviate
  1063. the PERG command as PE. Note that there is a command that does the opposite  of
  1064. what PERG does, called GREP.
  1065.  
  1066. 1 prompts
  1067.  
  1068. When you do certain things, ED responds by prompting you for input.  For  exam-
  1069. ple,  when you type ^Z, a "Command>" prompt appears. When you are responding to
  1070. such a prompt, you have a number of types of editing you  can  perform.  First,
  1071. you  can  recall  previously-entered  strings by pressing the up and down arrow
  1072. keys. See the help topic 'recall_commands' for more about this.  You  can  also
  1073. use  the  right  and  left  arrow  keys  to move about within characters you've
  1074. entered. You can pop the contents of the CHAR, WORD and LINE buffers  into  the
  1075. string,  and  you  can delete using the DELC, DELW and DELL command keys. About
  1076. the only kind of editing you can't do on the prompt line  is  APPEND  and  SET-
  1077. COPY.
  1078.  
  1079. 1 PWD
  1080.  
  1081. The PWD command makes ED print the name of the current working  directory.  You
  1082. can change the current working directory from within ED using the CD command.
  1083.  
  1084. You can abbreviate the PWD command as PW.
  1085.  
  1086. 1 QUIT
  1087.  
  1088. Leaves the file you're editing the way it was. Throws away any  edits  you  may
  1089. have made to the file.
  1090.  
  1091. You can use the single letter Q as an abbreviation for QUIT.
  1092.  
  1093. 1 recall_commands
  1094.  
  1095. Every time ED prompts you for some input, it stores what you type in.  You  can
  1096. recall these text strings by using the up- and down-arrow keys, just as you can
  1097. recall commands you give to DCL under VMS, or certain intelligent shells  under
  1098. unix.  ED,  however,  maintains  a  separate recallable list for each different
  1099. prompt. For example, if you are at the Search for> prompt, hitting the up-arrow
  1100. key  will  call up the last thing you entered at that particular prompt.  Simi-
  1101. larly, you can recall any file name you have entered in response to  the  File>
  1102. prompt, without having to slog through search strings and the like.
  1103.  
  1104. The lists of remembered strings are circular; when you get  to  the  end  of  a
  1105. list,  it  starts  you over at the beginning again. The down-arrow key lets you
  1106. move in the opposite direction through the list.
  1107.  
  1108. 1 recovery
  1109.  
  1110. In a recovery operation, ED takes its orders from a  journal  file  instead  of
  1111. from your terminal. This feature serves two purposes:
  1112.  
  1113.    1  It allows you to recover your  work  if  your  process  (or  the  system)
  1114.       crashes in the middle of an editing session.
  1115.  
  1116.    2  It allows you to create journal files that can be used as text file  pro-
  1117.       cessors.
  1118.  
  1119. There are two ways to get into recovery mode: one (-r) displays edits  on  your
  1120. screen,  the  other  (-t) does no terminal i/o, and terminates ED when it would
  1121. ordinarily prompt you for another file-to-edit. The latter makes it possible to
  1122. do text processing efficently.
  1123.  
  1124. 2 crash
  1125.  
  1126. When your process (or the system) crashes right in the  middle  of  an  editing
  1127. session,  you  can  recover  your  lost  work  by issuing the following command
  1128. (assuming that 'e' is how you ordinarily invoke ED):
  1129.  
  1130. $ e -r
  1131.  
  1132. ED will replay all your edits on the file. This may take some  time,  depending
  1133. on  how long you were in the file before the crash occurred. Once all the edits
  1134. have been replayed, the file will be displayed at the point you were at when it
  1135. crashed.  The  last few keystrokes you made before the crash may not appear; if
  1136. so, you will have to reenter them. It isn't necessary to EXIT or otherwise save
  1137. your  file at this point: even if another crash occurs, you can re-recover your
  1138. work any number of times.
  1139.  
  1140. 2 text_processing
  1141.  
  1142. The standard example of editor-controlled text processing is  global  substitu-
  1143. tion.  Suppose you want to change all instances of one string to another string
  1144. in a set of text files. You might set this up as follows:
  1145.  
  1146.    1  You edit a scratch file, specifying some random strings  for  the  search
  1147.       and paste buffers on the command line:
  1148.  
  1149.       $ e -sabc -pxyz scratchfile
  1150.  
  1151.    2  When ED comes up, you first FNDNXT forward, then issue  a  SUBST  command
  1152.       with  a  huge  repeat  count.  It doesn't matter if it beeps when you say
  1153.       FNDNXT, and it doesn't matter if no substitutions  actually  take  place.
  1154.       Just pretend everything worked.
  1155.  
  1156.    3  Next, you get out of ED. You have just created a journal file  that  does
  1157.       the basics of a global substitution.
  1158.  
  1159.    4  You copy the created journal file (whose name is on  the  first  line  of
  1160.       your editor startup file) to a safe place, say, globsub.jou.
  1161.  
  1162.    5  You can now issue a command to make ED perform global substitutions:
  1163.  
  1164.       $ e -sfrom_string -pto_string -tglobsub.jou filename
  1165.  
  1166.       The -s option lets you specify the search string, and the -p option  lets
  1167.       you  load the paste buffer with the replacement string. This command glo-
  1168.       bally substitutes a string in whatever files you specify.
  1169.  
  1170. 1 repeats
  1171.  
  1172. You can tell ED to perform any function repeatedly by using repeat counts.  You
  1173. enter  repeat counts by pressing the GOLD key, entering the number of times you
  1174. want an operation repeated, and then pressing a key. (You must use  the  number
  1175. keys  on  the  main  keyboard  to  enter  the repeat count, not the ones on the
  1176. keypad.) Suppose, for example, you wanted to insert 53 'a'  characters  in  the
  1177. file.  You  would  first  press  GOLD, then enter 53, then press a. You can use
  1178. repeat counts on any editor operation, even defined keys.
  1179.  
  1180. If you use a repeat count greater than nineteen on a defined key, ED shuts  off
  1181. the  display  while  it  executes  the  operation, then completely repaints the
  1182. screen once it is done.
  1183.  
  1184. 1 RESTORE
  1185.  
  1186. Use the RESTORE command to restore key definitions and/or editor  settings  the
  1187. you  have  modified during an editing session. For example, if you had used the
  1188. SET SEARCH command to alter your search settings from what  you  normally  use,
  1189. you  could  RESTORE  SEARCH  to  return  the  search parameters to their normal
  1190. values.
  1191.  
  1192. The values to which the various settings are restored are those stored in  your
  1193. startup file, which is named on the command line when you invoke ED.
  1194.  
  1195. The format of the RESTORE command is RESTORE item. If you just say RESTORE, all
  1196. items will be restored.
  1197.  
  1198. You can abbreviate the RESTORE command as R.
  1199.  
  1200. 2 AUTO_TABS
  1201.  
  1202. The RESTORE AUTO_TABS command will return the setting of the  AUTO_TABS  switch
  1203. to the value it had when you last stored it. See help on SET AUTO_TABS for more
  1204. information about auto tabs.
  1205.  
  1206. You can abbreviate the RESTORE AUTO_TABS as command R AU.
  1207.  
  1208. 2 AWRAP
  1209.  
  1210. The RESTORE AWRAP command will return the setting of the AWRAP  switch  to  the
  1211. value  it  had when you last stored it. See help on SET AWRAP for more informa-
  1212. tion about autowrapping.
  1213.  
  1214. You can abbreviate the RESTORE AWRAP as command R AW.
  1215.  
  1216. 2 BOX
  1217.  
  1218. The RESTORE BOX command will return the setting of the box mode switch  to  the
  1219. value  it had when you last stored it. See help on "box_mode" for more informa-
  1220. tion about box mode.
  1221.  
  1222. You can abbreviate the RESTORE BOX as command R B.
  1223.  
  1224. 2 CASE
  1225.  
  1226. The RESTORE CASE command will return the setting of the  case-change  value  to
  1227. the  value  it  had when you last stored it.  See the help on SET CASE for more
  1228. complete information about this value.
  1229.  
  1230. You can abbreviate this command as R CA.
  1231.  
  1232. 2 CFRIENDLY
  1233.  
  1234. The RESTORE CFRIENDLY command will return the setting of the  CFRIENDLY  switch
  1235. to the value it had when you last stored it. See help on SET CFRIENDLY for more
  1236. information about C-friendly mode.
  1237.  
  1238. You can abbreviate the RESTORE CFRIENDLY as command R CF.
  1239.  
  1240. 2 CLOSE_PARENS
  1241.  
  1242. The RESTORE CLOSE_PARENS command will return the setting  of  the  CLOSE_PARENS
  1243. switch  to  the  value  it  had  when  you  last  stored  it.  See  help on SET
  1244. CLOSE_PARENS for more information about parenthesis matching.
  1245.  
  1246. You can abbreviate the RESTORE CLOSE_PARENS command as R CL.
  1247.  
  1248. 2 DEFAULTS
  1249.  
  1250. The RESTORE DEFAULTS command will return the default file extension list to the
  1251. value  it had when you last stored it. See help on SET DEFAULTS for more infor-
  1252. mation about default extensions.
  1253.  
  1254. You can abbreviate the RESTORE DEFAULTS command as R D.
  1255.  
  1256. 2 GREP
  1257.  
  1258. The RESTORE GREP command will restore the setting of the GREPMODE switch to the
  1259. value it had when you last stored it. See help on SET GREP for more information
  1260. about GREP modes.
  1261.  
  1262. You can abbreviate the RESTORE GREP command as R G.
  1263.  
  1264. 2 KEYS
  1265.  
  1266. The RESTORE KEYS command will return all  your  defined  keys  to  their  saved
  1267. definitions.  If  you have defined any new keys before you use the RESTORE KEYS
  1268. command, those keys will become undefined.
  1269.  
  1270. You can abbreviate the RESTORE KEYS command as R K.
  1271.  
  1272. 2 OVERSTRIKE
  1273.  
  1274. The RESTORE OVERSTRIKE command will  restore  the  setting  of  the  OVERSTRIKE
  1275. switch  to the value it had when you last stored it. See help on SET OVERSTRIKE
  1276. for more information about overstrike mode.
  1277.  
  1278. You can abbreviate the RESTORE OVERSTRIKE command as R O.
  1279.  
  1280. 2 PAGE
  1281.  
  1282. The RESTORE PAGE command will restore the value of the page delimiter string to
  1283. what it was when you last stored it.
  1284.  
  1285. You can abbreviate the RESTORE PAGE command as R PAG.
  1286.  
  1287. 2 PARAGRAPH
  1288.  
  1289. The RESTORE PARAGRAPH command will restore the value of the paragraph delimiter
  1290. string to what it was when you last stored it.
  1291.  
  1292. You can abbreviate the RESTORE PARAGRAPH command as R PARA.
  1293.  
  1294. 2 PARENTHESES
  1295.  
  1296. The RESTORE PARENTHESES command will make ED restore the list of parentheses to
  1297. the  value  it had the last time you stored it. See help on SET PARENTHESES for
  1298. more information.
  1299.  
  1300. You can abbreviate this command as R PARE.
  1301.  
  1302. 2 SEARCH
  1303.  
  1304. The RESTORE SEARCH command will return your search  parameters  to  the  values
  1305. they had when you last stored them.
  1306.  
  1307. You can abbreviate the RESTORE SEARCH command as R SEA.
  1308.  
  1309. 2 SECTION
  1310.  
  1311. The RESTORE SECTION command will return the number of lines in a section to the
  1312. value it had when you last stored it.
  1313.  
  1314. You can abbreviate the RESTORE SECTION command as R SEC.
  1315.  
  1316. 2 SHELL
  1317.  
  1318. The RESTORE SHELL command will return the shell string to the value it had when
  1319. you last stored it.
  1320.  
  1321. You can abbreviate the RESTORE SHELL command as R SH.
  1322.  
  1323. 2 STABLE The RESTORE STABLE command will return the name of your current search
  1324. table  to  the  value  it had when you last stored it. See help on "search" for
  1325. more information about search tables.
  1326.  
  1327. You can abbreviate the RESTORE STABLE command as R ST.
  1328.  
  1329. 2 TABS
  1330.  
  1331. The RESTORE TABS command will return your tab settings to the values  they  had
  1332. when you last stored them.
  1333.  
  1334. You can abbreviate the RESTORE TABS command as R T.
  1335.  
  1336. 2 WILDCARD
  1337.  
  1338. The RESTORE WILDCARD command will return your WILDCARD character to  the  value
  1339. it had when you last stored it.
  1340.  
  1341. You can abbreviate the RESTORE WILDCARD command as R WI.
  1342.  
  1343. 2 WORD
  1344.  
  1345. The RESTORE WORD command will restore the values of the word delimiters to what
  1346. they were when you last stored them.
  1347.  
  1348. You can abbreviate the RESTORE WORD command as R WO.
  1349.  
  1350. 2 WRAP
  1351.  
  1352. The RESTORE WRAP command will return the wrap margin to the value it  had  when
  1353. you last stored it.
  1354.  
  1355. You can abbreviate the RESTORE WRAP command as R WR.
  1356.  
  1357. 1 search
  1358.  
  1359. Searching for a text string in ED works much the same way it does in EDT,  with
  1360. a few extensions. In addition to the EDT-like search settings:
  1361.  
  1362. o  General/Exact - controls case-sensitivity.
  1363. o  Beginning/End - where the cursor ends up.
  1364.  
  1365. ED includes four additional settings:
  1366.  
  1367. o  Wild/Nowild - controls whether search wildcards are enabled.
  1368. o  Table/Notable - controls whether a search table is used.
  1369. o  Regex/Noregex - controls whether regular expressions are used.
  1370. o  Char/Word - controls whether 'word mode' is used.
  1371.  
  1372. See the help on SET SEARCH for more information about setting the search flags.
  1373.  
  1374. 2 binary_mode
  1375.  
  1376. If the buffer you're searching in was opened  in  binary  mode,  ED  completely
  1377. ignores  the  line  breaks in your file, and just treats it as an uninterrupted
  1378. sequence of bytes. This means that you can search for carriage  return  charac-
  1379. ters (ASCII 13), which is impossible in ascii mode.
  1380.  
  1381. Binary-buffer searches ignore the WORD and REGEX search flags.  You  can,  how-
  1382. ever,  use  the  GENERAL/EXACT, WILD/NOWILD and TABLE/NOTABLE settings with the
  1383. usual effect.
  1384.  
  1385. 2 wildcards
  1386.  
  1387. There is a search setting (SET SEARCH [NO]WILD) that allows you to use  a  spe-
  1388. cial  character  you  specify  as a match-all character within a search string.
  1389. When your search string contains wildcards, ED ignores the correspond character
  1390. in the file.
  1391.  
  1392. You set the value of the wildcard character using the SET WILDCARD command.
  1393.  
  1394. When you use wildcards, make sure they are embedded within the  search  string.
  1395. Wildcards  on  either  end  of the search string are unnecessary and won't work
  1396. properly.
  1397.  
  1398. 2 tables
  1399.  
  1400. There is a search setting (SET SEARCH [NO]TABLE) that  allows  you  to  use  an
  1401. external  "translation  table"  to  modify  the  way your search proceeds. When
  1402. search is set to NOTABLE, the search works the way EDT's search does, that  is,
  1403. SET SEARCH GENERAL/EXACT takes precedence. When search is set TABLE, the search
  1404. routine uses the current search table (see help on  SET  STABLE)  to  translate
  1405. every  character in your file before it compares it to your search string. This
  1406. lets you do searches for for things like ##.##, where # represents any  numeric
  1407. character.
  1408.  
  1409. You can use ED to create search tables; they are just text files that contain a
  1410. pair of characters on each line. Here is an example:
  1411.  
  1412.                            0#
  1413.                            1#
  1414.                            2#
  1415.                            3#
  1416.                            4#
  1417.                            5#
  1418.                            6#
  1419.                            7#
  1420.                            8#
  1421.                            9#
  1422.                            +m
  1423.                            -m
  1424.                            /m
  1425.                            *m
  1426.                            =m
  1427.  
  1428. Each line of the search table file should have only two characters.  The  first
  1429. character  can  be  anything, the second character is the character you want to
  1430. use in your search string to match the first one. There should not be any blank
  1431. lines  in  the  file.  The  above example table lets you use the # character to
  1432. match any digit, and the m character to match mathematical operators.
  1433.  
  1434. Once you create a search table, you should use the SET STABLE command  to  tell
  1435. ED which table to use, and then say SET SEARCH TABLE to enable the table-driven
  1436. search mode.
  1437.  
  1438. 2 buffers
  1439.  
  1440. The PASTE, LINE, WORD and CHAR buffers are always available to you,  even  when
  1441. ED if prompting you for information. For example, when you enter a FIND command
  1442. (GOLD PF3), ED prompts you for a search string. You can, at this point,  either
  1443. type  the  string  in,  or use any of the keypad keys that unkill to add to the
  1444. search string. Suppose you had just killed the word 'xyz ' and  you  wanted  to
  1445. search  for  it.  You  would first enter FIND, then UNDW ('xyz ' appears in the
  1446. search string) and then FORW or BACKW to set the search direction.
  1447.  
  1448. This can be a very useful feature when combined with defined keys. You can pro-
  1449. gram a key that grabs a subroutine name and automatically opens the source file
  1450. for that routine, for example.
  1451.  
  1452. 2 regular_expressions
  1453.  
  1454. You should look at whatever unix documentation  is  available  for  a  complete
  1455. description  of regular expressions. We include here a brief description of the
  1456. most common features:
  1457.  
  1458.    1  In a regular expression, the character . matches any single character.
  1459.    2  A list of characters in square brackets matches any single character from
  1460.       the list. For example, [abc] would match 'a', 'b' or 'c'. You can use a -
  1461.       to indicate a range of characters:  [a-z]  matches  all  lowercase  alpha
  1462.       characters.
  1463.    3  Any other character must exactly match.
  1464.  
  1465. These are an extreme simplification of the rules, but they  may  help  get  you
  1466. started.  Note that enabling regular expressions overrides the WILD/NOWILD set-
  1467. ting.
  1468.  
  1469. 2 word_mode
  1470.  
  1471. The idea of word mode is that you can search for a set of  words,  without  any
  1472. restriction  on  the number of word delimiters that separate them. For example,
  1473. suppose the file contains:
  1474.  
  1475. This the first line,
  1476. and this is the second line.
  1477.  
  1478. In word mode, you could search for "line and" and ED would find  it,  since  it
  1479. ignores  the  ',' and the line break (assuming that ',' appears in your list of
  1480. word delimiters).
  1481.  
  1482. You can combine word mode and REGEX mode to search for a sequence of words that
  1483. match  a  sequence  of  regular expressions. This works as follows: your search
  1484. string is first broken up into a sequence of regular expressions. These must be
  1485. separated  by  spaces  (if  you  want  to use a space within one of the regular
  1486. expressions, use [:space:]). Now ED scans the file for  words,  comparing  each
  1487. word to one of these regular expressions. A match is found when all of the reg-
  1488. ular expressions match their corresponding words.
  1489.  
  1490. 1 SET
  1491.  
  1492. The SET command allows you set certain editor parameters.
  1493.  
  1494. You can abbreviate the SET command as SE.
  1495.  
  1496. 2 AUTO_TABS
  1497.  
  1498. The  SET AUTO_TABS  command controls whether  tabs and spaces are automatically
  1499. generated  when  you  hit a RETURN in a file. If you say SET AUTO_TABS ON, then
  1500. whenever you hit RETURN in the file, ED checks the previous  line,  and  if  it
  1501. begins with one or more whitespace characters,  ED  inserts the same whitespace 
  1502. just to the left of the cursor.  To turn auto tabs off,  say  SET AUTO_TABS OFF.
  1503. To change it from off to on or vice-versa, say SET AUTO_TABS TOGGLE.
  1504.  
  1505. You can abbreviate the SET AUTO_TABS as command SE AU.
  1506.  
  1507. 2 AWRAP
  1508.  
  1509. Use the SET AWRAP command to control whether ED  'autowraps'  your  text  entry
  1510. when  the length of a line exceeds the 'wrap margin' (see SET WRAP). If you say
  1511. SET AWRAP ON, then whenever you type characters and the cursor goes beyond  the
  1512. wrap  margin, ED inserts a carriage return. To turn autowrap off, say SET AWRAP
  1513. OFF. To change it from off to on or vice-versa, say SET AWRAP TOGGLE.
  1514.  
  1515. You can abbreviate the SET AWRAP as command SE AW.
  1516.  
  1517. 2 BOX
  1518.  
  1519. The SET BOX command puts ED  in  "box  cut/paste"  mode.  See  the  help  topic
  1520. "box_mode" for a description of box mode.
  1521.  
  1522. To get into box mode, say SET BOX ON. To return to normal  mode,  say  SET  BOX
  1523. OFF.  To change it from off to on or vice-versa, say SET BOX TOGGLE.
  1524.  
  1525. You can abbreviate the SET BOX command as SE B.
  1526.  
  1527. 2 CASE
  1528.  
  1529. Use the SET CASE command to control the effect of the  CHGCAS  key.  There  are
  1530. four possible settings for CASE:
  1531.  
  1532. Upper        This setting causes the CHGCAS key to set the  affected  range  to
  1533.              upper case.
  1534. Lower        This setting causes the CHGCAS key to set the  affected  range  to
  1535.              lower case.
  1536. Opposite     This setting causes the CHGCAS key to change upper  to  lower  and
  1537.              vice-versa.
  1538. Capitalize   This setting causes the CHGCAS key to capitalize each word in  the
  1539.              range.
  1540.  
  1541. You can abbreviate the SET CASE command as SE CA.
  1542.  
  1543. 2 CFRIENDLY
  1544.  
  1545. Use the SET CFRIENDLY command to control whether ED automatically formats  your
  1546. file  whenever  you type a } character. If you say SET CFRIENDLY ON, then when-
  1547. ever you type }, ED finds the matching { character, and inserts  a  line  break
  1548. and the same whitespace  as found on the line with the  {  to align the  }.  To 
  1549. turn this mode off, say  SET CFRIENDLY OFF.  To  change  it  from  off to on or 
  1550. vice-versa, say SET CFRIENDLY TOGGLE.
  1551.  
  1552. You can abbreviate the SET CFRIENDLY command as SE CF.
  1553.  
  1554. 2 CLOSE_PARENS
  1555.  
  1556. Use the SET CLOSE_PARENS command  to  control  whether  ED  shows  you  closing
  1557. parentheses.  If  you say SET CLOSE_PARENS ON, and you type an open parenthesis
  1558. or a close parenthesis, your cursor will briefly jump to the  matching  closing
  1559. or  opening  parenthesis. To turn the feature off, say SET CLOSE_PARENS OFF. To
  1560. change it from off to on or vice-versa, say SET CLOSE_PARENS TOGGLE.
  1561.  
  1562. Actually, you have to specify which kinds of parentheses you want the editor to
  1563. match with each other. See help on SET PARENTHESES for more information.
  1564.  
  1565. You can abbreviate the SET CLOSE_PARENS command as SE CL.
  1566.  
  1567. 2 DEFAULTS
  1568.  
  1569. Use the SET DEFAULTS command to set your list of default  extensions.  Whenever
  1570. you  give  ED  a  file name to edit or include, it first tries to open the file
  1571. name as given. If it can't find the  file,  it  tries  appending  your  default
  1572. extensions,  one  at  a  time,  checking  each new file name to see if the file
  1573. exists. If it finds a file, it assumes you meant that  one  and  proceeds  nor-
  1574. mally.  If it doesn't find any existing file, it opens an empty buffer and uses
  1575. the name you gave at first as the name for that buffer.
  1576.  
  1577. The effect of this is that you don't have to always be typing file  extensions.
  1578. Usually ED will open the file you wanted, given only its first name.
  1579.  
  1580. The syntax is SET DEFAULTS ext1 ext2 ext3... You can have any number of  exten-
  1581. sions. Don't include the . in the extensions, ED will provide that for you.
  1582.  
  1583. You can abbreviate the SET DEFAULTS command as SE D.
  1584.  
  1585. 2 GREP
  1586.  
  1587. Use the SET grep command to control whether GREP displays include an indication
  1588. of how many lines intervene between match lines. There are two GREP modes: VER-
  1589. BOSE and SILENT. In verbose mode, ED reports the  intervening  lines,  whil  in
  1590. silent mode, it doesn't. The mode applies in the same way to displays generated
  1591. by the PERG command.
  1592.  
  1593. You can abbreviate the SET GREP command as SE G.
  1594.  
  1595. 2 OVERSTRIKE
  1596.  
  1597. Use the SET OVERSTRIKE command to control whether ED is in 'insert'  or  'over-
  1598. strike'  mode.  In  insert mode (the default), characters you type are inserted
  1599. into file records, shifting things over to make room for the  inserted  charac-
  1600. ters.  In overstrike mode, characters you type overlay the existing characters.
  1601. To turn this mode on, say  SET OVERSTRIKE ON.  To turn this mode off,  say  SET 
  1602. OVERSTRIKE OFF.  To change it from off to on or vice-versa, say  SET OVERSTRIKE
  1603. TOGGLE.
  1604.  
  1605. You can abbreviate the SET OVERSTRIKE command as SE O.
  1606.  
  1607. 2 PAGE
  1608.  
  1609. Use the SET PAGE command to set the page delimiter string.  When  you  use  the
  1610. PAGE  command,  ED  will search for this string, position it on THE top line of
  1611. the current window, and move the cursor to the end  of  the  page  string.  The
  1612. default  page string is control-L (the form-feed character). To change the page
  1613. delimiter string, hit control-Z to get the command prompt, and enter SE PAG. ED
  1614. will  prompt  you  for  the  page delimiter string. You can enter up to sixteen
  1615. characters. Terminate the entry by pressing ENTER.
  1616.  
  1617. 2 PARAGRAPH
  1618.  
  1619. Use the SET PARAGRAPH command to  set  the  paragraph  delimiter  string.  This
  1620. string  is  used  by the FILL command to decide where paragraphs start and end.
  1621. FILL will perform word fill within a paragraph, but will  not  disturb  strings
  1622. that  match  the delimiter string or characters on either side of such strings.
  1623. The default paragraph delimiter string  is  two  carriage  returns  in  a  row.
  1624. Another  useful  paragraph delimiter string is the tab character, especially if
  1625. your text is heavily indented with tabs.  To  change  the  paragraph  delimiter
  1626. string,  hit  control-Z  to  get the command prompt, and enter SE PARA. ED will
  1627. prompt you for the paragraph delimiter string. You  can  enter  up  to  sixteen
  1628. characters. Terminate the entry by pressing ENTER.
  1629.  
  1630. 2 PARENTHESES
  1631.  
  1632. Use the SET PARENTHESES command to set the parenthesis list. ED uses this  list
  1633. to  decide  what  characters  to  match with each other when CLOSE_PARENS is in
  1634. effect.
  1635.  
  1636. The parenthesis list is a set of up to sixteen pairs of characters.  The  first
  1637. character  in  each pair is called the OPEN character; the second is called the
  1638. CLOSE character. When CLOSE_PARENS is in effect, ED looks at each character you
  1639. insert  to see if it is in the parenthesis list. If it appears as an OPEN char-
  1640. acter, ED searches forwards from the cursor position, looking for the  matching
  1641. CLOSE  character in your file. If it finds a match, it moves the cursor to that
  1642. character for a moment so you can see which character matched. If the character
  1643. you  insert  is  a  CLOSE  character,  ED searches backwards in your file for a
  1644. matching OPEN characters, and does the same maneuver with the cursor.
  1645.  
  1646. If the OPEN and CLOSE characters of a pair are the same, ED  just  scans  back-
  1647. wards for the first occurrence of the character.
  1648.  
  1649. To change the parenthesis list, hit control-Z to get the  command  prompt,  and
  1650. enter SE PARE. ED will prompt you for the parenthesis list. You can enter up to
  1651. sixteen pairs of characters. Terminate the entry by pressing ENTER. Remember to
  1652. enter PAIRS of characters. A typical parenthesis list might look like (){}[].
  1653.  
  1654. 2 SEARCH
  1655.  
  1656. Use the SET SEARCH command to change the way ED searches for strings  when  you
  1657. use  the  FNDNXT key. There are six independent search parameters, and each one
  1658. has two possible settings.
  1659.  
  1660. The default search settings are:
  1661.  
  1662. GENERAL,BEGINNING,NOWILD,NOTABLE,NOREGEX,CHAR.
  1663.  
  1664. You can abbreviate the SET SEARCH command as SE SEA.
  1665.  
  1666. 3 GENERAL/EXACT
  1667.  
  1668. If search is set GENERAL, ED ignores whether letters are upper  or  lower  case
  1669. when  it searches. If set EXACT, the match must be exact, including the case of
  1670. the letters.
  1671.  
  1672. GENERAL may be abbreviated as G, EXACT as EX.
  1673.  
  1674. 3 BEGINNING/END
  1675.  
  1676. Determines whether ED leaves the cursor at the beginning or end of  the  search
  1677. string, once it finds it.
  1678.  
  1679. BEGINNING may be abbreviated as BE, END as EN.
  1680.  
  1681. 3 NOWILD/WILD
  1682.  
  1683. If set WILD, embedded any appearance of the WILDCARD character  in  the  search
  1684. string  will be treated as a match-all, that is, any character will be a match.
  1685. If set NOWILD, WILDCARD characaters in the search string  must  be  matched  by
  1686. WILDCARD  characters in the file. Wildcards should not be used at the beginning
  1687. or end of the search string. They are unnecessary there.
  1688.  
  1689. You can set the WILDCARD value using the SET WILDCARD command.
  1690.  
  1691. NOWILD may be abbreviated as NOW, WILD as WI.
  1692.  
  1693. 3 NOTABLE/TABLE
  1694.  
  1695. If set TABLE,  all  buffer  characters  are  translated,  using  the  currently
  1696. selected  search table, before they are compared with the search string. If set
  1697. NOTABLE, the search table is not used, and the setting of  GENERAL/EXACT  takes
  1698. effect. See help on SEARCH for more information.
  1699.  
  1700. NOTABLE may be abbreviated as NOT, TABLE as T.
  1701.  
  1702. 3 NOREGEX/REGEX
  1703.  
  1704. If set REGEX, your search strings are treated as regular expressions  (such  as
  1705. are  understood  by  'grep'),  rather than as text strings. Regular expressions
  1706. give you much more flexibility in searching than regular strings do.  See  help
  1707. on SET SEARCH for more information about regular expressions.
  1708.  
  1709. NOREGEX may be abbreviated as NOR, REGEX as R.
  1710.  
  1711. 3 CHAR/WORD
  1712.  
  1713. If you set WORD, ED uses 'word mode' to search the  file.  In  word  mode,  the
  1714. search  string is broken up into words (using the currently-defined word delim-
  1715. iters) and ED searches for those words, regardless of what separates them.  The
  1716. idea  is  that  you can search for a sequence of words, even if there is a line
  1717. break in the middle of them. See the help topic  "search  word_mode"  for  more
  1718. about this.
  1719.  
  1720. CHAR may be abbreviated as C, WORD as WO.
  1721.  
  1722. 2 SECTION
  1723.  
  1724. Use the SET SECTION command to set the number of lines the  SECTION  key  moves
  1725. the  cursor.  The syntax of the command is SET SECTION n, where n is the number
  1726. of lines in a section.
  1727.  
  1728. If you SET SECTION to a value less than or equal to  zero,  it  is  interpreted
  1729. differently.  If  you  SET  SECTION 0, for example, that means a section is one
  1730. screenful, that is, the number of lines that are visible in the current window.
  1731. If  you set it to -1, that means one screenful minus 1, giving a 1-line overlap
  1732. between sections. Similarly, -5 would mean a 5-line overlap.
  1733.  
  1734. You can abbreviate the SET SECTION command as SE SEC.
  1735.  
  1736. 2 SHELL
  1737.  
  1738. Use the SET SHELL command to set the shell that  you  use  (on  unix  systems).
  1739. When  you  use  the window Spawn command, this shell will be run in the created
  1740. process. The syntax is SET SHELL command-that-invokes-shell.  For  example,  c-
  1741. shell users would say SET SHELL /bin/csh.
  1742.  
  1743. You can abbreviate the SET SHELL command as SE SH.
  1744.  
  1745. 2 STABLE
  1746.  
  1747. Use the SET STABLE command to set the name of the  current  search  table.  The
  1748. syntax  of the SET STABLE command is SET STABLE table_file_name. For a descrip-
  1749. tion of the table format, see the 'search' help topic.
  1750.  
  1751. You can abbreviate the SET STABLE command as SE ST.
  1752.  
  1753. 2 TABS
  1754.  
  1755. The SET TABS command allows you change the tab settings on your  terminal.  The
  1756. tab  settings  are  defined in your startup file, and you can edit them freely.
  1757. The syntax is SET TABS tab_name, where tab_name  is  defined  in  your  startup
  1758. file.
  1759.  
  1760. You can abbreviate the SET TABS command as SE T.
  1761.  
  1762. 2 WILDCARD
  1763.  
  1764. Use the SET WILDCARD command to indicate which ascii character you want to  use
  1765. as a wildcard in searches when the search mode is set WILD. For example, if you
  1766. say SET WILDCARD x, and you SET SEARCH WILD, you can use  'x'  as  a  match-all
  1767. character in your search strings.
  1768.  
  1769. You can abbreviate the SET WILDCARD command as SE WI.
  1770.  
  1771. 2 WORD
  1772.  
  1773. Use the SET WORD command to tell ED what characters delimit words. ED considers
  1774. the  beginning  of a word to be any character that is preceded by a word delim-
  1775. iter character. The default word delimiters are: space, carriage  return,  line
  1776. feed,  vertical tab, form feed, and tab. The set of word delimiters affects the
  1777. behavior of the WORD, DELW, and delete-to-beginning-of-word keys. To change the
  1778. word  delimiters, hit control-Z to get the command prompt, and enter SE WO.  ED
  1779. will prompt you for the new word delimiters. You can  enter  up  to  sixty-four
  1780. characters.  Each character you enter will become a valid word delimiter.  Ter-
  1781. minate the entry by pressing ENTER.
  1782.  
  1783. 2 WRAP
  1784.  
  1785. Use the SET WRAP command to set the right margin the FILL command uses when  it
  1786. does  word  fill  on the select range. The syntax is SET WRAP n, where n is the
  1787. column number of the right-hand margin.
  1788.  
  1789. You can abbreviate the SET WRAP command as SE WR.
  1790.  
  1791. 1 SHOW
  1792.  
  1793. Use the SHOW command to display information about current editor  settings  and
  1794. file  names. The syntax is SHOW item. If you omit the item, ED will display all
  1795. current settings and file names.
  1796.  
  1797. You can abbreviate the SHOW command as SH.
  1798.  
  1799. 2 AUTO_TABS
  1800.  
  1801. The SHOW AUTO_TABS command will make ED display whether the auto  tabs  feature
  1802. is turned on or off. See the 'SET AUTO_TABS' help topic for more information.
  1803.  
  1804. You can abbreviate this command as SH AU.
  1805.  
  1806. 2 AWRAP
  1807.  
  1808. The SHOW AWRAP command will make ED display whether  the  autowrap  feature  is
  1809. turned on or off. See the 'SET AWRAP' help topic for more information.
  1810.  
  1811. You can abbreviate this command as SH AW.
  1812.  
  1813. 2 BOX
  1814.  
  1815. The SHOW BOX command will make ED display whether box cut/paste mode is  turned
  1816. on or off. See the "box_mode" help topic for more information.
  1817.  
  1818. You can abbreviate this command as SH B.
  1819.  
  1820. 2 CASE
  1821.  
  1822. The SHOW CASE command will make ED display  the  current  case-change  setting,
  1823. which may be Upper, Lower, Opposite or Capitalize. See the help on SET CASE for
  1824. more complete information about these choices.
  1825.  
  1826. You can abbreviate this command as SH CA.
  1827.  
  1828. 2 CFRIENDLY
  1829.  
  1830. The SHOW CFRIENDLY command will make ED  display  whether  C-friendly  mode  is
  1831. turned on or off. See the 'SET CFRIENDLY' help topic for more information.
  1832.  
  1833. You can abbreviate this command as SH CF.
  1834.  
  1835. 2 CLOSE_PARENS
  1836.  
  1837. The SHOW CLOSE_PARENS command will make ED display whether parenthesis matching
  1838. is  turned  on  or off. See the 'SET CLOSE_PARENS' help topic for more informa-
  1839. tion.
  1840.  
  1841. You can abbreviate this command as SH CL.
  1842.  
  1843. 2 DEFAULTS
  1844.  
  1845. The SHOW DEFAULTS command will make ED display the current list of default file
  1846. extensions. See the 'SET DEFAULTS' help topic for more information.
  1847.  
  1848. You can abbreviate this command as SH D.
  1849.  
  1850. 2 GREP
  1851.  
  1852. The SHOW GREP command will make ED display whether the GREP command is in  ver-
  1853. bose or silent mode. See the 'SET GREP' help topic for more information.
  1854.  
  1855. You can abbreviate this command as SH G.
  1856.  
  1857. 2 MODIFICATIONS
  1858.  
  1859. The SHOW MODIFICATIONS command will make ED indicate  whether  the  buffer  the
  1860. cursor is in has been modified since it was opened.
  1861.  
  1862. You can abbreviate the SHOW MODIFICATIONS command as SH M.
  1863.  
  1864. 2 OVERSTRIKE
  1865.  
  1866. The SHOW OVERSTRIKE command will make ED display  whether  overstrike  mode  is
  1867. turned on or off. See the 'SET OVERSTRIKE' help topic for more information.
  1868.  
  1869. You can abbreviate this command as SH O.
  1870.  
  1871. 2 PAGE
  1872.  
  1873. The SHOW PAGE command will make ED display the current page  delimiter  string.
  1874. This  string  is  used  by the keypad PAGE command to define the beginning of a
  1875. page. You can set the value of this string with the SET PAGE command.
  1876.  
  1877. You can abbreviate this command as SH PAG.
  1878.  
  1879. 2 PARAGRAPH
  1880.  
  1881. The SHOW PARAGRAPH command will make ED display the current paragraph delimiter
  1882. string.  This  string  is used by the keypad FILL command to decide where para-
  1883. graphs start and end. You can set the value of this string with the  SET  PARA-
  1884. GRAPH command.
  1885.  
  1886. You can abbreviate this command as SH PARA.
  1887.  
  1888. 2 PARENTHESES
  1889.  
  1890. The SHOW PARENTHESES command will make ED display the currently active list  of
  1891. parentheses. See the 'SET PARENTHESES' help topic for more information.
  1892.  
  1893. You can abbreviate this command as SH PARE.
  1894.  
  1895. 2 POSITION
  1896.  
  1897. The SHOW POSITION command will make ED display:
  1898.  
  1899. o  The line number of the line the cursor is on.
  1900. o  Which byte of the file the cursor is on (record  terminators  count  as  one
  1901.    byte).
  1902. o  Which row of the screen the cursor is on.
  1903. o  Which column of the screen the cursor is on.
  1904.  
  1905. You can have ED display your position constantly by using the  -u  option  when
  1906. you invoke ED. See the 'invoking_ed' help topic for more information.
  1907.  
  1908. You can abbreviate this command as SH PO.
  1909.  
  1910. 2 SEARCH
  1911.  
  1912. The SHOW SEARCH command will make ED display the current search  settings.  See
  1913. the help on SEARCH for a description of these settings.
  1914.  
  1915. You can abbreviate this command as SH SEA.
  1916.  
  1917. 2 SECTION
  1918.  
  1919. The SHOW SECTION command will make ED display the number of  lines  the  cursor
  1920. moves when you hit the SECTION key. You can modify this value with the SET SEC-
  1921. TION command.
  1922.  
  1923. You can abbreviate this command as SH SEC.
  1924.  
  1925. 2 TABS
  1926.  
  1927. The SHOW TABS command will make ED display the name of the current  tab  setup.
  1928. You can change the tab settings with the SET TABS command.
  1929.  
  1930. You can abbreviate this command as SH T.
  1931.  
  1932. 2 WILDCARD
  1933.  
  1934. The SHOW WILDCARD command will make ED display the current search-string  WILD-
  1935. CARD value. See SET WILDCARD for a description of how search wildcards work.
  1936.  
  1937. 2 WORD
  1938.  
  1939. The SHOW WORD command will make ED display the current set of word  delimiters.
  1940. See SET WORD for a description of how the word delimiters work.
  1941.  
  1942. You can abbreviate this command as SH WO.
  1943.  
  1944. 2 WRAP
  1945.  
  1946. The SHOW WRAP command will make ED display the current value of the  fill  wrap
  1947. margin. This value is used by the keypad FILL command. See help on SET WRAP for
  1948. information about this parameter.
  1949.  
  1950. You can abbreviate this command as SH WO.
  1951.  
  1952. 1 SMALLER
  1953.  
  1954. The SMALLER command makes the window the cursor is in smaller.  The  syntax  is
  1955. SMALLER  lines, where lines is how many screen lines you want deducted from the
  1956. window. Other windows are made bigger to accommodate the new size.
  1957.  
  1958. You can abbreviate the SMALLER command as SM.
  1959.  
  1960. 1 SORT
  1961.  
  1962. The SORT command sorts a group of records in a buffer. The  command  syntax  is
  1963. SORT  or SORT R if you want reverse (descending) order. Its behavior depends on
  1964. whether select is active, and whether box mode is in effect:
  1965.  
  1966. If select is not active, the entire buffer is sorted.
  1967.  
  1968. If select is active, and box mode is not in effect, only the  select  range  is
  1969. sorted,  with  the  proviso  that only the records that would be (at least par-
  1970. tially) killed, if you issued a CUT command, are sorted.
  1971.  
  1972. If box mode is in effect, only the records that  participate  in  the  box  are
  1973. sorted,  and  only what is in the box determines the order. In other words, the
  1974. portion of each record that is in the box is  the  key  for  the  sort.  Entire
  1975. records are sorted, however, not just what's in the box. Note that records that
  1976. do not extend into the box are treated as having blank keys.
  1977.  
  1978. You cannot abbreviate the SORT command, because the danger of mistyping another
  1979. command is too great.
  1980.  
  1981. 1 startup
  1982.  
  1983. When you start ED, you specify on the command  line  the  name  of  a  personal
  1984. startup  file,  which contains all your preferences for how ED works. Here is a
  1985. sample startup file:
  1986.  
  1987.  ~/ed.jou
  1988.  shell=/bin/csh
  1989.  tabs=5
  1990.  curtab=1
  1991.  NORMAL
  1992.  t       t       t       t       t       t       t       t       t       t...
  1993.  c
  1994.  t   t   t   t   t   t   t   t   t   t   t   t   t   t   t   t   t   t   t...
  1995.  fortran
  1996.  t       t   t   t   t   t   t   t   t   t   t   t   t   t   t   t   t   t...
  1997.  macro
  1998.  t               t        t     t     t     t     t     t     t     t     t...
  1999.  none
  2000.  tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt...
  2001.  wrap=80
  2002.  section=18
  2003.  word=<1d>032<1d>009,.+=-*/[]{}()<1d>010<1d>011<1d>012<1d>013
  2004.  page=<1d>012
  2005.  paragraph=<1d>013<1d>013
  2006.  search=gbnn
  2007.  stable=~/categories.st
  2008.  close=y
  2009.  parens=(){}[]
  2010.  defext=c h for mar com dat log rno
  2011.  auto=y
  2012.  cfriendly=y
  2013.  boxmode=n
  2014.  ndefined=11
  2015.  d1 3 da 1 6f 1 d 1 ce 3 da 1 63 1 d 1 ...
  2016.  
  2017. In this file, the ASCII character <1d> is special:  it  is  always  immediately
  2018. followed by three decimal digits that give the value of the intended character.
  2019. The page delimiter character, for example, appears as <1d>012, which means  the
  2020. ASCII form-feed character (whose decimal value is 12). You should represent any
  2021. non-printable character in this way, when it needs to  appear  in  the  startup
  2022. file.
  2023.  
  2024. There follows a description of each line in the file:
  2025.  
  2026.    ~/ed.jou
  2027.         The name of the default journal file. ED uses this to allow you to  say
  2028.         ED -r when you want to recover whatever you were last working on.
  2029.    shell=/bin/csh
  2030.         The command you want ED to use when you create a  Spawn  window  (which
  2031.         creates a window with another process in it).
  2032.    tabs=5
  2033.         The number of tab setups that follow.
  2034.    curtab=1
  2035.         Which tab setup is to be used by default (number 0 is the first).
  2036.    NORMAL
  2037.    t      t...
  2038.         Each tab setup is described by two lines. The first line gives the name
  2039.         of  the  setup  (which  you  use  when issuing a SET TABS command). The
  2040.         second line is a series of t's and spaces that tells ED where  the  tab
  2041.         stop  are.  In  the  example file, the NORMAL setup has tab stops every
  2042.         eight columns.
  2043.    wrap=80
  2044.         The left margin beyond which word fill will not extend  any  line.  See
  2045.         the help on "KEYPAD details FILL" for more information.
  2046.    section=18
  2047.         The number of lines ED moves when you issue a SECTION command. If  this
  2048.         value  is  less than or equal to zero, the number of lines moved is the
  2049.         number of lines in the current window, plus the value. A value  of  -1,
  2050.         for  example,  will  cause  the  SECTION command to move one screenful,
  2051.         minus one line (so you have a one-line overlap).
  2052.    word=<1d>032<1d>009,.+=-*/[]{}()<1d>010<1d>011<1d>012<1d>013
  2053.         The characters that are considered to delimit  'words'  in  your  file.
  2054.         This affects the move-by-word command, the delete-word command, and the
  2055.         word-fill command.  For example, when you do a DELW, ED starts  at  the
  2056.         cursor  position, looking for a character that is in the word-character
  2057.         list, followed by a character that is not  in  the  list,  and  deletes
  2058.         everything up to (but not including) the second character.
  2059.    page=<1d>012
  2060.         The character that delimits a page.
  2061.    paragraph=<1d>013<1d>013
  2062.         The string that delimits a paragraph. Text that is  separated  by  this
  2063.         string is not joined together during a word fill operation.
  2064.    search=gbnnn
  2065.         The default search flags:
  2066.  
  2067.            a) g means case-insensitive, else (e) case-sensitive.
  2068.            b) b means match position is at beginning of string, else (e) end.
  2069.            c) w means wildcards are enabled, else (n) not.
  2070.            d) n means no search table, else (t) table in effect.
  2071.            e) r means use regular expression searching, n means don't.
  2072.               r overrides the rest of the flags, except beginning/end.
  2073.  
  2074.    stable=~/categories.st
  2075.         The name of the search table file to be  used  if  the  search  is  set
  2076.         TABLE.
  2077.    close=y
  2078.         Determines whether ED highlights closing parentheses. If set to 'y', ED
  2079.         will  briefly  highlight a corresponding parenthesis character when you
  2080.         type a parenthesis character. Set it  to  'n'  to  disable  parenthesis
  2081.         closing.
  2082.    parens=(){}[]
  2083.         The list of known parenthesis characters (for which parenthesis closing
  2084.         is performed).
  2085.    defext=c h for mar com dat log rno
  2086.         The list of default file extensions. When ED can't find a file name you
  2087.         provide,  it  tries  appending a period and each of these extensions to
  2088.         the name.  If it still doesn't find an existing file,  it  assumes  you
  2089.         want to create a new file, using the original name.
  2090.    auto=y
  2091.         Controls the 'auto tabs' feature. If set to 'y', ED will  automatically
  2092.         insert  enough tabs to line you up with the previous line in your file,
  2093.         each time you hit RETURN. This is handy in many programming  languages.
  2094.         Set it to 'n' to turn the feature off.
  2095.    cfriendly=y
  2096.         Controls the 'c-friendly' mode. If set to 'y',  ED  will  automatically
  2097.         position  }  characters directly under the { character they match. This
  2098.         is useful when programming in C. Set it to 'n' to disable the feature.
  2099.    boxmode=n
  2100.         Controls whether CUT and PASTE work in 'box mode'. See  the  'box_mode'
  2101.         help  topic  for  more about box mode. Set it to 'n' to disable box cut
  2102.         and paste.
  2103.    ndefined=11
  2104.         Tells how many key definitions to expect on the  immediately  following
  2105.         lines.   Set  this to 0 initially; ED will alter it whenever you define
  2106.         some keys and then issue a STORE KEYS command.
  2107.  
  2108. 1 STORE
  2109.  
  2110. Use the STORE command to make a permanent copy of any or all  of  your  current
  2111. editor  settings  and  key  definitions. The current values and definitions are
  2112. written into your startup file on disk; whenever you start up ED, it reads  the
  2113. contents of the startup file to determine what settings and key definitions you
  2114. want to start up with.
  2115.  
  2116. The format of the STORE command is STORE item. If you just say STORE, all items
  2117. will be stored.
  2118.  
  2119. You can abbreviate the STORE command as ST.
  2120.  
  2121. 2 AUTO_TABS
  2122.  
  2123. The STORE AUTO_TABS command will make ED  store  the  current  setting  of  the
  2124. AUTO_TABS  switch.  See  help  on SET AUTO_TABS for more information about auto
  2125. tabs.
  2126.  
  2127. You can abbreviate this command as ST AU.
  2128.  
  2129. 2 AWRAP
  2130.  
  2131. The STORE AWRAP command will make ED store the current  setting  of  the  AWRAP
  2132. switch. See help on SET AWRAP for more information about autowrapping.
  2133.  
  2134. You can abbreviate this command as ST AW.
  2135.  
  2136. 2 BOX
  2137.  
  2138. The STORE BOX command will make ED store the current setting of  the  box  mode
  2139. switch. See help on "box_mode" for more information about box mode.
  2140.  
  2141. You can abbreviate this command as ST B.
  2142.  
  2143. 2 CASE
  2144.  
  2145. The STORE CASE command will make ED store the  current  setting  of  the  case-
  2146. change  value,  which  may be one of Upper, Lower, Opposite or Capitalize.  See
  2147. the help on SET CASE for more information about these choices.
  2148.  
  2149. You can abbreviate this command as ST CA.
  2150.  
  2151. 2 CFRIENDLY
  2152.  
  2153. The STORE CFRIENDLY command will make ED  store  the  current  setting  of  the
  2154. CFRIENDLY  switch.  See  help  on  SET  CFRIENDLY for more information about C-
  2155. friendly mode.
  2156.  
  2157. You can abbreviate this command as ST CF.
  2158.  
  2159. 2 CLOSE_PARENS
  2160.  
  2161. The STORE CLOSE_PARENS command will make ED store the current  setting  of  the
  2162. CLOSE_PARENS  switch.  See  help on SET CLOSE_PARENS for more information about
  2163. parenthesis matching.
  2164.  
  2165. You can abbreviate this command as ST CL.
  2166.  
  2167. 2 DEFAULTS
  2168.  
  2169. The STORE DEFAULTS command will make  ED  store  the  current  setting  of  the
  2170. DEFAULTS  extension  list.  See help on SET DEFAULTS for more information about
  2171. how default extensions work.
  2172.  
  2173. You can abbreviate this command as ST D.
  2174.  
  2175. 2 GREP
  2176.  
  2177. The STORE GREP command will make ED store the current setting of  the  GREPMODE
  2178. switch. See help on SET GREP for more information about GREP modes.
  2179.  
  2180. You can abbreviate this command as ST G.
  2181.  
  2182. 2 KEYS
  2183.  
  2184. The STORE KEYS command will make ED save all of your currently defined keys.
  2185.  
  2186. You can abbreviate the STORE KEYS command as ST K.
  2187.  
  2188. 2 OVERSTRIKE
  2189.  
  2190. The STORE OVERSTRIKE command will make ED store  the  current  setting  of  the
  2191. OVERSTRIKE  switch. See help on SET OVERSTRIKE for more information about over-
  2192. strike mode.
  2193.  
  2194. You can abbreviate this command as ST O.
  2195.  
  2196. 2 PAGE
  2197.  
  2198. The STORE PAGE command will store the  current  value  of  the  page  delimiter
  2199. string.
  2200.  
  2201. You can abbreviate the STORE PAGE command as ST PAG.
  2202.  
  2203. 2 PARAGRAPH
  2204.  
  2205. The STORE PARAGRAPH command will store the current value of the paragraph  del-
  2206. imiter string.
  2207.  
  2208. You can abbreviate the STORE PARAGRAPH command as ST PARA.
  2209.  
  2210. 2 PARENTHESES
  2211.  
  2212. The STORE PARENTHESES command will make ED store the currently active  list  of
  2213. parentheses. See help on SET PARENTHESES for more information.
  2214.  
  2215. You can abbreviate this command as ST PARE.
  2216.  
  2217. 2 SEARCH
  2218.  
  2219. The STORE SEARCH command will make ED save your current search parameters.
  2220.  
  2221. You can abbreviate the STORE SEARCH command as ST SEA.
  2222.  
  2223. 2 SECTION
  2224.  
  2225. The STORE SECTION command will make ED save your  current  SECTION  value.  The
  2226. SECTION  value is the number of lines ED moves the cursor when you hit the SEC-
  2227. TION key.
  2228.  
  2229. You can abbreviate the STORE SECTION command as ST SEC.
  2230.  
  2231. 2 STABLE
  2232.  
  2233. The STORE STABLE command will make ED save your current search table file name.
  2234.  
  2235. You can abbreviate the STORE STABLE command as ST ST.
  2236.  
  2237. 2 TABS
  2238.  
  2239. The STORE TABS command will make ED store the name of the tab  settings  you're
  2240. currently using.
  2241.  
  2242. You can abbreviate the STORE TABS command as ST T.
  2243.  
  2244. 2 WILDCARD
  2245.  
  2246. The STORE WILDCARD command will store the current search-string WILDCARD  char-
  2247. acter.  See SET WILDCARD for more about search wildcards.
  2248.  
  2249. You can abbreviate the STORE WILDCARD command as ST WI.
  2250.  
  2251. 2 WORD
  2252.  
  2253. The STORE WORD command will store the current values of the word delimiters.
  2254.  
  2255. You can abbreviate the STORE WORD command as ST WO.
  2256.  
  2257. 2 WRAP
  2258.  
  2259. The STORE WRAP command will store the current wrap margin.
  2260.  
  2261. You can abbreviate the STORE WRAP command as ST WR.
  2262.  
  2263. 1 SUBSTITUTE
  2264.  
  2265. The SUBSTITUTE command makes ED replace  every  appearance  of  a  string  with
  2266. another string. It applies only the the window the cursor is in. The syntax is:
  2267.  
  2268. SUBSTITUTE /string1/string2/
  2269.  
  2270. This command will cause every appearance of string1 (in the current window)  to
  2271. be  changed to string2. Note that you can use a character other than '/' if one
  2272. of your strings actually contains the '/' character:
  2273.  
  2274. SUBSTITUTE ?/usr/lib?/usr/local/lib?
  2275.  
  2276. In this case, '?' is the delimiter, and the '/' characters are considered  part
  2277. of the strings.
  2278.  
  2279. The second string can be null (which makes the command just remove instances of
  2280. the first string). This looks like this:
  2281.  
  2282. SUBSTITUTE /xyz//
  2283.  
  2284. This command would remove all appearances of the string 'xyz'.  Note  that  you
  2285. can't use a null value for string1; ED will complain if you try.
  2286.  
  2287. You can abbreviate the SUBSTITUTE command as SU. Note that there  is  a  keypad
  2288. key  called SUBST that does one or more substitutions. You can find more infor-
  2289. mation about this by looking at the help topic 'keypad details SUBST'.
  2290.  
  2291. 1 tabs
  2292.  
  2293. Your startup file defines a number of tab setups. Here is an example:
  2294.  
  2295.  tabs=5
  2296.  curtab=1
  2297.  normal
  2298.  t       t       t       t       t       t       t       t       t...
  2299.  c
  2300.  t   t   t   t   t   t   t   t   t   t   t   t   t   t   t   t   t...
  2301.  fortran
  2302.  t       t   t   t   t   t   t   t   t   t   t   t   t   t   t   t...
  2303.  macro
  2304.  t               t        t     t     t     t     t     t     t     t...
  2305.  none
  2306.  tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt...
  2307.  
  2308. The first line, tabs=5, means that there  are  five  tab  setups  defined.  The
  2309. second  line, curtab=1, means that the default tab setup (when you start up ED)
  2310. is number one. Note that the first setup is number zero, so in this  case,  the
  2311. default tab setup is 'c'.
  2312.  
  2313. Immediately following the curtab=1 line are the tab  setup  definitions.  There
  2314. must  be  exactly as many tab setups as are claimed by the tabs= line. Each tab
  2315. setup has two lines: the first gives the name of the setup, which can  be  any-
  2316. thing. The second line actually shows there the tab stops are. This line should
  2317. have a t in the first column, followed by a t in each column you want the  cur-
  2318. sor to move to when you hit tab.
  2319.  
  2320. It's a good idea to make the tab setup lines long enough  that  they  can  work
  2321. correctly  for the widest terminal you expect to use. If you run off the end of
  2322. a tab setup (that is, a record in the file is longer than the tab  setup  line)
  2323. ED reverts to every-eight-column tabs.
  2324.  
  2325. 1 terminals
  2326.  
  2327. ED is somewhat device-independent. There is no information  in  the  executable
  2328. code  that  tells  ED  how  a  given terminal works; all such terminal-specific
  2329. information is kept in external disk files, which are read in when you start up
  2330. ED.  These  files are called terminal description files. If you have a terminal
  2331. that is not already supported by ED, you can (if you understand how your termi-
  2332. nal  works)  create  a terminal description file for that terminal. Once you do
  2333. this, you will be able to use ED on that kind of terminal.
  2334.  
  2335. 2 teaching
  2336.  
  2337. You can teach ED about the sequences of byte your keyboard generates by  invok-
  2338. ing  ED  with the -z option. It will ask you for the name of an existing confi-
  2339. guration file (from which it gets the terminal display  control  commands)  and
  2340. then  will prompt you to press all the key combinations it understands. It will
  2341. also ask you how many additional keys you want to have available.  By  default,
  2342. these  additional  keys  will make ED insert meaningless eightbit characters in
  2343. the file, but you can store key definitions under them.
  2344.  
  2345. 2 caveats
  2346.  
  2347. ED distinguishes between terminals that have some smarts,  and  terminals  that
  2348. are  'braindead'.  Braindead terminals are considered completely uncontrollable
  2349. in the conventional way (that is, by  sending  control  strings  to  them)  and
  2350. require  special  programming  of some kind in order that ED can use them. This
  2351. has been done (so far) only for DOS and OS/2 machines.
  2352.  
  2353. Terminals that have some smarts may have more or less smarts depending on their
  2354. design.  If  a terminal has no control string to position the cursor, for exam-
  2355. ple, you should probably tell ED that the terminal is braindead and write what-
  2356. ever special code is necessary.
  2357.  
  2358. ED expects non-braindead terminals to be able to do at least the following:
  2359.  
  2360. o  Position the cursor.
  2361. o  Erase the screen.
  2362. o  Erase from the cursor to the end of the cursor's line.
  2363. o  Erase from the cursor to the bottom of the screen.
  2364. o  Move the cursor to the right or left.
  2365. o  Do something like what carriagereturn does.
  2366. o  Do something like what carriagereturn-newline does, with scrolling.
  2367.  
  2368. 2 file_format
  2369.  
  2370. The first 19 lines of the description file contain control strings. If the ter-
  2371. minal doesn't support a particular kind of control string, the single character
  2372. ~ should appear on the corresponding line. This tells ED that  that  capability
  2373. is  missing, and ED attempts to compensate for that. Braindead terminals should
  2374. have a ~ on all lines except the 17th.
  2375.  
  2376. The control strings are (in order):
  2377.  
  2378.    1  A string that initializes the terminal. This string is sent to the termi-
  2379.       nal when you start ED.
  2380.    2  A string that returns the terminal to 'normal' mode. This string is  sent
  2381.       to the terminal when you leave ED.
  2382.    3  A string that positions the cursor. This  string  is  in  printf  format,
  2383.       where  the  row  and column are inserted into the string. A typical value
  2384.       (for ANSI terminals) would be <escape>[%d;%dH.
  2385.    4  A string that sets the scrolling region. This string is in printf format,
  2386.       where  the  row  and column are inserted into the string. A typical value
  2387.       (for ANSI terminals) would be <escape>[%d;%dr. This functionality is  not
  2388.       required, but it makes ED more efficient.
  2389.    5  A string that puts the terminal in reverse-video  mode.  This  is  not  a
  2390.       required function, but it improves ED's appearance.
  2391.    6  A string that returns the terminal to normal-video mode.
  2392.    7  A string that makes the terminal beep or warn the user in some way.  This
  2393.       is  an  optional  functionality,  but it helps for communicating with the
  2394.       user.
  2395.    8  A string that makes the terminal delete lines, starting with the line the
  2396.       cursor  is on, scrolling up from the bottom of the scrolling region. This
  2397.       string has one parameter (the number of lines to delete) and it, like the
  2398.       positioning string, is in printf format (e.g.: <escape>[%dM).
  2399.    9  A string that makes the terminal insert blank lines at the  cursor  posi-
  2400.       tion,  scrolling  existing  lines down toward the bottom of the scrolling
  2401.       region. This string has one parameter (the number of lines to delete) and
  2402.       it,   like   the   positioning   string,   is  in  printf  format  (e.g.:
  2403.       <escape>[%dL).
  2404.    10 A string that erases the entire screen.
  2405.    11 A string that erases all characters (on the cursor's line) from the  cur-
  2406.       sor position to the right side of the screen.
  2407.    12 A string that moves the cursor up, unless the cursor is at the top of the
  2408.       scrolling region, in which case the scrolling region is scrolled down.
  2409.    13 A string that moves the cursor down, unless the cursor is at  the  bottom
  2410.       of  the  scrolling region, in which case the scrolling region is scrolled
  2411.       up.
  2412.    14 A string that moves the cursor to the right. This string has one  parame-
  2413.       ter   (the   number   of   columns  to  move)  in  printf  format  (e.g.:
  2414.       <escape>[%dC).
  2415.    15 A string that moves the cursor to the left. This string has one parameter
  2416.       (the number of columns to move) in printf format (e.g.: <escape>[%dD).
  2417.    16 A string that moves the cursor to the beginning of the next line,  scrol-
  2418.       ling up if the cursor is at the bottom of the scrolling region. Most ter-
  2419.       minals will use carriagereturn-linefeed for this.
  2420.    17 A string that ED uses to show you where the end of the file is. <eob>  is
  2421.       recommended.
  2422.    18 A string that moves the cursor to the beginning  of  the  line  it's  on.
  2423.       Carriagereturn should work for most terminals.
  2424.    19 A string that erases from the  cursor  position  to  the  bottom  of  the
  2425.       screen.
  2426.  
  2427. These control strings may contain strange control characters,  so  to  make  it
  2428. easier  to  represent such characters, there is a trick for including them in a
  2429. way that won't confuse the operating system when it's  reading  the  file.  The
  2430. ASCII  character 29 (decimal) is special; ED looks at the next three characters
  2431. in the string, and interprets them as an decimal representation of the  charac-
  2432. ter you really want. For example, to represent linefeed, you would use <29>010.
  2433.  
  2434. Immediately following the control  strings  is  a  section  of  the  file  that
  2435. describes  what characters are generated by the terminal when you press various
  2436. keys (in particular, the keypad keys). The first line of this section  contains
  2437. a  key  count  (this is line 20 of the file). The key count must be at least 44
  2438. (there are 44 required special keys that ED expects to have fixed meanings). If
  2439. you  want  to  have  other keys available to ED (for defining) you should use a
  2440. count greater than 44.
  2441.  
  2442. Following the key count are the sequences of characters the terminal will  send
  2443. to ED when you press keys. You should use the ASCII 29 trick to represent char-
  2444. acters that your operating system might not like. The sequences must be in  the
  2445. following order:
  2446.  
  2447.                          UP
  2448.                          DOWN
  2449.                          RIGHT
  2450.                          LEFT
  2451.                          NEXTLINE
  2452.                          WORD
  2453.                          EOL
  2454.                          CHAR
  2455.                          FORW
  2456.                          BACKW
  2457.                          CUT
  2458.                          PAGE
  2459.                          SECTION
  2460.                          APPEND
  2461.                          DELW
  2462.                          DELC
  2463.                          SELECT
  2464.                          ENTER
  2465.                          GOLD
  2466.                          CLONE
  2467.                          FNDNXT
  2468.                          DELL
  2469.                          OPENLINE
  2470.                          CHGCASE
  2471.                          DELEOL
  2472.                          SPECINS
  2473.                          BOTTOM
  2474.                          TOP
  2475.                          PASTE
  2476.                          COMMAND
  2477.                          FILL
  2478.                          REPLACE
  2479.                          UNDW
  2480.                          UNDC
  2481.                          RESET
  2482.                          SUBST
  2483.                          GOLD GOLD (not actually used)
  2484.                          WINDOW
  2485.                          FIND
  2486.                          UNDL
  2487.                          RETURN
  2488.                          MARK
  2489.                          SLIDERIGHT
  2490.                          SLIDELEFT
  2491.  
  2492. You should probably look at the ansi.ed template  file  to  see  how  all  this
  2493. works.  Following the 44th character sequence, you can put additional sequences
  2494. that your terminal may be capable of generating.  Including  them  in  the  the
  2495. description makes it possible to define the corresponding keys.
  2496.  
  2497. 1 TIME
  2498.  
  2499. The TIME command loads the paste buffer with the current time  of  day  in  the
  2500. format  HH:MM:SS,  where  HH is the hour(military), MM is the minute, and SS is
  2501. the second.
  2502.  
  2503. You can use TI as an abbreviation for TIME.
  2504.  
  2505. 1 TRIM
  2506.  
  2507. The TRIM command trims trailing blanks and tabs from every record in  a  buffer
  2508. (or  from  every  record in the select range, if select is active). When you do
  2509. this, you won't see anything, since the trimmed characters are not visible.
  2510.  
  2511. You can use TR as an abbreviation for TRIM.
  2512.  
  2513. 1 UNLOAD
  2514.  
  2515. The UNLOAD command stores all of your key definitions is a listing file,  which
  2516. you can edit and then reload using the LOAD command.
  2517.  
  2518. The syntax of the command is UNLOAD filename, where filename is the name of the
  2519. created file containing the key definition listing.
  2520.  
  2521. You can abbreviate the UNLOAD command as U.
  2522.  
  2523. 1 wildcards
  2524.  
  2525. ED allows you to use wildcards in file names; when you do so, it edits matching
  2526. files  in alphabetical order, one after the other. They way this works is a bit
  2527. complicated, and varies a bit from system to system. What you  need  to  under-
  2528. stand  is  that  processing  of  wildcards in file names depends on whether the
  2529. shell (on unix systems) 'sees' the wildcard characters, or whether only ED sees
  2530. them.  (Note:  none  of this discussion applies to VMS systems, because they do
  2531. not have a shell).
  2532.  
  2533. If you invoke ED from the command line, the shell will, in general, expand  any
  2534. wildcards it sees. For example, if you say
  2535.  
  2536. ED *.c
  2537.  
  2538. the shell will find all names matching *.c, and convert your command into some-
  2539. thing like this:
  2540.  
  2541. ED abc.c xyz.c zzzzz.c
  2542.  
  2543. and *then* invoke ED. Thus, ED does not, in general, see any wildcards in files
  2544. coming  from  the  command line. On the other hand, when you are looking at the
  2545. File> prompt, and you enter  file  names  with  wildcards,  the  shell  is  not
  2546. involved, and the expansion is controlled by ED alone.
  2547.  
  2548. This means that you can take advantage of full  regular  expression  processing
  2549. when  invoking ED from the command line, and take advantage of a different kind
  2550. of wildcarding when you specify files in response to the File> prompt.  Specif-
  2551. ically, the wildcards supported within ED are:
  2552.  
  2553. *      The * matches any (possibly null) string of characters.
  2554.  
  2555. ?      The ? matches any single character.
  2556.  
  2557. ...    The  string  ...  is  an  instruction  to  search   all   subdirectories
  2558.        recursively, similarly to what ls -R does.
  2559.  
  2560. The best way to explain is with examples:
  2561.  
  2562. *.c               This would match all .c files in the current  working  direc-
  2563.                   tory.
  2564.  
  2565. a?b.c             This would match  files  like  azb.c,  or  aab.c,  but  *not*
  2566.                   addb.c. The ? matches only a single character.
  2567.  
  2568. .../*.c           This would match all .c files in the current  working  direc-
  2569.                   tory, and all subdirectories of it, down to any depth.
  2570.  
  2571. /a/b/.../e*/*.h   This would match all .h files that are in  directories  whose
  2572.                   names  start with e, which are in /a/b or any subdirectory of
  2573.                   /a/b.
  2574.  
  2575. You may find that ED just sits there when you use the more  complicated  forms.
  2576. This  is  not  wrong,  ED  is just examining all the directories you specified,
  2577. finding all file names that match. Once the first file appears, things  proceed
  2578. quickly.
  2579.  
  2580. 1 windows
  2581.  
  2582. This section describes the windowing feature, which lets you  open  windows  to
  2583. other files while you are editing your main file.
  2584.  
  2585. 2 using_windows
  2586.  
  2587. ED allows you to split the terminal screen up into separate 'windows' that show
  2588. the  contents of different files, or different parts of the same file.  Windows
  2589. let you compare, at a glance,  information  that  resides  in  separate  files,
  2590. without having to memorize or write anything down.
  2591.  
  2592. They are especially useful to programmers, who frequently  need  to  make  sure
  2593. that  some subroutine is receiving the same arguments that some calling routine
  2594. is trying to pass to it. It is a simple  matter,  for  instance,  to  use  your
  2595. system's  online  help  command  to  create a file containing useful programmer
  2596. information. Once this file is on the system, anyone can window into it to  get
  2597. the information without having to go chasing after manuals.
  2598.  
  2599. 2 window_command
  2600.  
  2601. To enter window command mode, press the WINDOW key on the keypad (usually  Gold
  2602. PF2). You will get a prompt:
  2603.  
  2604. Open,Close,Move,Spawn>
  2605.  
  2606. If you get this prompt by mistake, just hit RETURN to continue editing.
  2607.  
  2608. 2 OPEN
  2609.  
  2610. To open a new window, respond to the main window prompt by typing O and hitting
  2611. RETURN. You will get a new prompt:
  2612.  
  2613. Open file>
  2614.  
  2615. If you just hit RETURN here, you will be telling ED to create a new copy of the
  2616. data  in the window you're currently editing. If you enter a file name, ED will
  2617. try to open the file you specify and load its contents  into  the  new  window.
  2618. Wildcards are allowed in the file name; the first matching file ED finds is the
  2619. one it selects. Default extensions (from your startup file) are applied to  the
  2620. filename  you  specify,  if  it  has no extension. If no file with the name you
  2621. specify exists, an empty window is created.
  2622.  
  2623. You can use the -b or -h options either when you type O, or when you enter  the
  2624. file  name.  Entering  the  filename as just -b will make a copy of the current
  2625. window, but will display it in binary mode.
  2626.  
  2627. The new window will appear at the bottom of the screen. Any other windows  will
  2628. be  chopped  or  squeezed  upward to make enough room for it. Since the minimum
  2629. window size is three lines, you may run out of room on the screen. Once the new
  2630. window  appears,  the data from the appropriate file will fill it (if appropri-
  2631. ate) and the cursor will jump to the top of the new window.
  2632.  
  2633. You can set the cursor's initial position in the new file by  specifying  -innn
  2634. when  you  give the O command. This works the same way the -i option works when
  2635. you invoke ED.
  2636.  
  2637. 2 MOVE
  2638.  
  2639. To move from one window to another, there are three options:
  2640.  
  2641.    1  Respond to the main window prompt by typing M  and  hitting  RETURN.  The
  2642.       cursor  will move to the window above the one it's in. If it's already in
  2643.       the top window, it moves to the bottom window. This means that when there
  2644.       are two windows display, M moves to the 'other' window.
  2645.  
  2646.    2  There is a shorthand involved in the move command, to wit: ML  will  move
  2647.       to  the "last" window, that is, the window above the one you're currently
  2648.       in. The 'L' can be repeated: MLLL will move to the window three above the
  2649.       current  one.   Similarly,  MN  will  move  to the "next" window; the one
  2650.       below. MNN will move two windows down, etc.
  2651.  
  2652.    3  You can use the MARK and RETURN commands to toggle back and forth between
  2653.       two windows. See the help on MARK for more about how these commands work.
  2654.  
  2655. 2 CLOSE
  2656.  
  2657. To close a window, there are two options:
  2658.  
  2659.    1  Respond to the main window prompt by typing C  and  hitting  RETURN.  The
  2660.       window  the  cursor is in will be removed from the screen. Note that this
  2661.       does not cause any update to disk files; the buffer is just thrown  away.
  2662.       Also,  you cannot close the top window this way; you must QUIT or EXIT to
  2663.       get out of that one.
  2664.  
  2665.    2  There is a shorthand involved in the close command, to wit: CL will close
  2666.       the "last" window, that is, the window above the one you're currently in.
  2667.       The 'L' can be repeated: CLLL will  close  the  window  three  above  the
  2668.       current  one.  Similarly, CN will close the "next" window; the one below.
  2669.       CNN will close the window two windows down, etc.
  2670.  
  2671. 2 SPAWN
  2672.  
  2673. The window SPAWN command has two forms: one to create a new window and let  you
  2674. run  commands  in it, and another to run a single command, without creating any
  2675. new window.
  2676.  
  2677. If you just say SPAWN (which can be abbreviated as S), ED makes a new window on
  2678. the  screen,  but instead of loading a file into it, it creates another process
  2679. on the system. This lets you talk to the operating system, look for files, read
  2680. mail  and  whatnot,  without  really leaving your editing session. When you get
  2681. done with a spawned window, you log out in the usual way, and the  window  (and
  2682. its process) disappears. At this point, you can continue editing where you left
  2683. off. (If your terminal doesn't support scrolling, you may need to hit control-W
  2684. to fix the screen when you log out of the window.)
  2685.  
  2686. If you put an operating system command following the word SPAWN,  ED  runs  the
  2687. command in a subprocess and returns to the window prompt as soon as the command
  2688. completes. No new window appears, and any output from the shell command appears
  2689. on  the  screen in a disorderly way (use control-W to restore the appearance of
  2690. the screen). If you're editing on a unix system, you can  redirect  the  output
  2691. (if any) of the command, to avoid messing up the screen.
  2692.  
  2693. 1 WRITE
  2694.  
  2695. The WRITE command will make ED write the contents  of  the  current  window  to
  2696. disk. The current window is the one the cursor is in. The syntax is
  2697.  
  2698. WRITE filename
  2699.  
  2700. If you leave the filename off and just say WRITE, a new  version  of  the  file
  2701. that  the window looks into will be created. If select is active when you issue
  2702. the WRITE command, the contents of the select range will be written, instead of
  2703. the entire file. If box mode is in effect, only the box is written.
  2704.  
  2705. Writing the select range can be dangerous, so be careful. In fact, if you issue
  2706. the  WRITE  command  without  specifying  a file name, ED turns select off, and
  2707. writes out the entire file. This is to prevent you  from  trying  to  WRITE  to
  2708. update  a  file,  when you don't know that select is active, and ending up with
  2709. only that select range in the file. If you want to write a  select  range,  you
  2710. *must*  specify a file name. If you are editing test.dat, and you *really* want
  2711. to write a select range back to that file, say WRITE test.dat.
  2712.  
  2713. One trouble with the WRITE command is  that  you  may  make  it  impossible  to
  2714. correctly  recover  edits  if your process (or the system) crashes. Suppose you
  2715. window into a file, kill some text, write the window, pop back to the main win-
  2716. dow, and insert the killed text, and then the system crashes. Because you modi-
  2717. fied the file you windowed into (by WRITEing it), the recovery won't  find  the
  2718. windowed  file  in  the  same state it was in originally. My policy is to avoid
  2719. getting text I insert into the main buffer from files I later WRITE to.
  2720.  
  2721. You can abbreviate the WRITE command as W.
  2722.